Security_DenyServiceAccess
Description
Section titled “Description”Denies a Trustee (user or group) access to a Service.
Syntax
Section titled “Syntax”Security_DenyServiceAccess(sService, sTrustee) As Boolean
Parameters
Section titled “Parameters”sService (String)
Section titled “sService (String)”Name of the service (the service name, not the display name)
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.
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_DenyServiceAccess("Service", "S-1-5-4")Related functions
Section titled “Related functions”Security functions Security_SetServicePermissions Security_RevokeServicePermissions Constants Package Property Variables