Tuesday, July 20, 2010

VBS Script for changing NTFS permissions

This script does simply as the title suggests, changes NTFS permissions for the given directories. Uses the Command Prompt command CACLS.

Set objShell = CreateObject("wscript.Shell") 
With objShell
  .Run "cmd /c cacls c:\ /e /g " & chr(34) & "Authenticated Users" & chr(34) &     ":F", 0
  .Run "cmd /c cacls c:\ /e /g " & chr(34) & "Authenticated Users" & chr(34) &  ":F", 0
End with

No comments:

Post a Comment