Security\_SetServicePermissions
Description
Section titled “Description”Sets permissions on a Service for a Trustee
sRight can be one of the following values:
- F: Full Control
- R: Generic Read
- W: Generic Write
- X: Generic Execute
- L: Read Control
- Q: Query Service Configuration
- S: Query Service Status
- E: Enumerate Dependent Services
- C: Service Change Configuration
- T: Start Service
- O: Stop Service
- P: Pause/Continue Service
- I: Interrogate Service
- U: Service User-Defined Control Commands
Syntax
Section titled “Syntax”Security_SetServicePermissions(sService, sTrustee, sRight) As Boolean
Parameter
Section titled “Parameter”sService (String)
Name of the Service
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_SetServicePermissions("Service", "S-1-5-4", "F")Related functions
Section titled “Related functions”Security functions Security_DenyServiceAccess Security_RevokeServicePermissions