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)
Name of the Share
sTrustee (String)
A trustee is a user or group. Trustee can either be “Domainname/username” or a Well-known SID’s (Security Identifier)
sRight (String)
Access Right that should be set
Example
Section titled “Example”VBScript
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