Security_SetServicePermissions
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
Security_SetServicePermissions(sService, sTrustee, sRight) As Boolean
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 (Security Identifier)
sRight (String)
Access Right that should be set
Example
VBScript
If bStatus Then bStatus = Security_SetServicePermissions("Service", "S-1-5-4", "F")
Related functions
Security functions Security_DenyServiceAccess Security_RevokeServicePermissions