setting folder permission

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
i wan the user to not able to delete,move,copy,modify,read or do anything to do folder.
i have a folder called permission. i am able to set the protection to restricted.
but there is a problem. when u double click the folder. it will ask u to continue or not. if yes, u are granted full access rights.
how to disable this? Dim UserAccount As String = My.Computer.Name & "user"
Dim FolderInfo As IO.DirectoryInfo = New IO.DirectoryInfo(FolderPath)
Dim FolderSec As New DirectorySecurity
FolderSec.AddAccessRule(New FileSystemAccessRule(UserAccount, FileSystemRights.ReadPermissions, AccessControlType.Allow))
FolderSec.SetAccessRuleProtection(True, True)
FolderInfo.SetAccessControl(FolderSec)

View the full article
 
Back
Top