Security_SetSharePermissions
Description
Section titled “Description”Sets the permissions on a Share for a Trustee.
sRight can be one of the following values:
- F: Full Control
- C: Change
- R: Read
Syntax
Section titled “Syntax”Security_SetSharePermissions(sShare, sTrustee, sRight) As Boolean
Parameters
Section titled “Parameters”sShare (String)
Section titled “sShare (String)”UNC path of the share, for example \\server01\CapaInstaller
sTrustee (String)
Section titled “sTrustee (String)”A trustee is a user or group. The trustee can be a name in the format Domain\User or a well-known SID (security identifier). Some built-in group names, such as Power Users, are localized, so use the SID for those.
sRight (String)
Section titled “sRight (String)”Access Right that should be set
Return value
Section titled “Return value”The function returns False if SubInACL.exe can’t be found, or if SubInACL reports an error. See Security functions for where the library looks for SubInACL.exe.
Example
Section titled “Example”If bStatus Then bStatus = Security_SetSharePermissions("\\Server01\CapaInstaller", "S-1-5-4", "F")Related functions
Section titled “Related functions”Security functions Security_DenyShareAccess Security_RevokeSharePermissions Constants Package Property Variables