473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Changing drive permissions

I am trying to chavge permission on the specific drive and force enheritance
so only the user, system, and Administrators have full control. I can do
this using the following, but xcacl needs to be in the system32 folder. Is
there a way to do this straight in vb instead of call a shell function? If
so how?

'----- Change Permission on D Drive (xcacls needs to be in the
system32 folder)-----
drive = "D:\"
permd = "xcacls " & drive & " /P System:F Administrators:F " &
userid & ":F /Y"
Call Shell(permd)
Thanks - Mike

Mar 6 '07 #1
1 1389
You should be able to do this using WMI. You can download my WMI presentation
by going to:

http://blog.davidmccarter.net/PermaL...44c55ff27.aspx

That should get you going.

======================================
David McCarter [Microsoft VB.NET MVP]
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"Mike" wrote:
I am trying to chavge permission on the specific drive and force enheritance
so only the user, system, and Administrators have full control. I can do
this using the following, but xcacl needs to be in the system32 folder. Is
there a way to do this straight in vb instead of call a shell function? If
so how?

'----- Change Permission on D Drive (xcacls needs to be in the
system32 folder)-----
drive = "D:\"
permd = "xcacls " & drive & " /P System:F Administrators:F " &
userid & ":F /Y"
Call Shell(permd)
Thanks - Mike
Mar 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Leonid | last post by:
Hello I have VC++ .NET 2003 ATL Server project. In one of its method I need to write some information in a local txt file. This txt file and this ATL Server are on the same ‘C: \’ drive. When...
3
by: James N | last post by:
My ASP.NET application needs read/write permissions for drive "Z:", which is mapped to my Linksys Gigadrive (Network Attached Storage...if anyone is familiar with that). If I configure the...
1
by: JeffW | last post by:
Researched this, but none of the proposed solutions are working for me. Am hoping for some insight. Am trying to open a binary file that exists on a shared drive for reading. Code lives inside...
4
by: robert d via AccessMonster.com | last post by:
When my app starts up, it creates a temporary database. This temp database is created from a 'model' database that is in the same folder as the application. Because there is a model, the creation...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.