How can I set in Windows 'read-only' mode for specific logical disks (like F :), which That FAT32? I know about political permissions for removable storage in gpedit.msc, but they work together for all logical disks. I want to set this mode via disk mode (F: H: etc.). How can I do this? I tried to write simple C # code, which changed the access permissions for the disc, but it does not work for the fata disk:
System Security AccessControl.DirectorySecurity D = System.IO.Directory.GetAccessControl ("F: \\"); Security Identifier All = New Security Identifier (WellenSideType.World SID, blank); FileSystemAccessRule accRule = New FileSystemAccessRule (All, FileSystemRights.Write, AccessControlType.Danny); D.AddAccessRule (accRule); System.IO.Directory.SetAccessControl ("F: \\", d);
No comments:
Post a Comment