Security_SetRegPermissions

Description

Sets access right for a trustee on a Registry Key

sRight can be one of the following values:

  • F: Full Control
  • R: Read
  • A: Read Control
  • Q: Query Value
  • S: Set Value
  • C: Create Sub key
  • E: Enumerate Sub keys
  • Y: Notify
  • L: Create Link
  • D: Delete
  • W: Write DAC
  • O: Write owner

 

Syntax

Security_SetRegPermissions(sHandle, sKey, sTrustee, sRight, bIncludeSubKeys) As Boolean

 

Parameters

sHandle (String)

Registry Key

sKey (String)

Name of sub key

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

bIncludeSubKey (Boolean)

sInclude sub keys (True/False)

 

Example

VBScript
If bStatus Then bStatus = Security_SetRegPermissions("HKLM", "Software\CapaInstaller", "S-1-5-4", "F", True)

Scripting Guidelines

 

Related functions

Security functions Security_DenyRegAccess Security_RevokeRegPermissions