Setting Folder Permissions in .NET

  • Thread starter Thread starter Simon Bates
  • Start date Start date
S

Simon Bates

I want to write a VB.NET function which sets write permission on a
folder for a specific user in my domain. Can anyone help me with this?

I have seen code extracts which refer to using an Interop assembly
created from activeds.tlb, however, I believe this works only for
Windows XP and above. My solution needs to work for Windows 2000 too.
Does anyone know of an elgant way of doing this in VB.NET? Any
feedback will be very welcome.
 
Hi,

Thanks for your post. As I understand, you want to set NTFS folder
permissions in your VB .NET application. Please correct me if there is any
misunderstanding. Generally speaking, we can Active Directory Service
Interfaces (ADSI) which supports Windows 2000, Windows XP and later. The KB
article Q818362 describs it in detail and contains a sample:

HOW TO: Programmatically Set NTFS File System Folder Permissions by Using
Microsoft Visual Basic .NET
http://support.microsoft.com/?id=818362

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top