Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • F: Full Control
  • C: Change
  • R: Read
  • X: Execute
  • E: Read Execute
  • W: Write
  • D: Delete

Notes: 

Some names of Trustees has been localized, such as Power Users. In these cases you have to use the SID. If bIncludeSubDirs has been set to True, the parameter sDir will change to sDir & "*" e.g. from C:\Temp to C:\Temp*
If more than one access right needs to be applied the values must be added in the same sRight string e.g. "RW" to obtain Read and Write access on the Directory. 

 


Syntax

Security_SetDirPermissions(sDir, sTrustee, sRight, bIncludeSubDirs) As Boolean 

 


Parameters

sDir (String)

Name of the Directory

...

Include subdirectories (True/False)

 


Example

Code Block
languagescala
themeEclipse
languagescala
titleVBScript
If bStatus Then bStatus = Security_SetDirPermissions(gsProgramFiles & "\CapaInstaller\Logs","S-1-5-4", "F", True)

Scripting Guidelines

 


Related functions

Security functions Security_DenyDirAccess Security_RevokeDirPermissions