Skip to content

Security_DenyRegAccess

Denies a Trustee (user or group) all access (Full Control) to a Registry key.

Security_DenyRegAccess(sHandle, sKey,sTrustee) As Boolean

Root key: HKLM, HKCU, HKCR, HKU or HKCC. The long names, such as HKEY_LOCAL_MACHINE, also work.

Path of the subkey, for example Software\CapaInstaller

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.

The function returns False if sHandle isn’t valid, or if SetACL can’t be found. See Security functions.

If bStatus Then bStatus = Security_DenyRegAccess("HKLM", "Software\CapaInstaller", "S-1-5-4")

Scripting Guidelines

Security functions Security_SetRegPermissions Security_RevokeRegPermissions Constants Package Property Variables