OverviewExamples
number File.SetPermissions ( |
string UserSID = SID_EVERYBODY, number AccessMode = SET_ACCESS, |
-- Set the permissions of the file to everyone.
strCommonProductFile = Shell.GetFolder(SHF_APPLICATIONDATA_COMMON).."\\MyFile.txt";
File.SetPermissions(strCommonProductFile, SID_EVERYBODY, SET_ACCESS, ALL_PERMISSIONS, SUB_CONTAINERS_AND_OBJECTS_INHERIT);
Sets the permissions of the file "MyFile.txt" located in the common application data folder to full access permissions by everyone.
-- Set the permissions of the product folder in application data common to everyone.
strCommonProductFolder = Shell.GetFolder(SHF_APPLICATIONDATA_COMMON).."\\MyProductFolder";
File.SetPermissions(strCommonProductFolder, SID_EVERYBODY, SET_ACCESS, ALL_PERMISSIONS, SUB_CONTAINERS_AND_OBJECTS_INHERIT);
Sets the permissions of the folder "MyProductFolder" located in the common application data folder to full access permissions by everyone.
See also: Related Actions