0

New to this forum. I am trying to finish up a script that creates a folder structure and assigns permissions via icacls. I have the script working correctly except for one thing. When setting permissions with iCacls the folders have inheriting permissions set on. I want the permissions to be only set for that folder and not inheriting to the child folders/files. Currently the command that I am using is:

intRunError = objShell.Run("%COMSPEC% /c Echo Y| icacls " & strFolderPath & " /c /grant Administrators:(NP)(RX) ", 2, True)

I thought that the (np) setting would do the trick but no love.... I don't have much experience using icacls and would appreciate any insight on how to prevent inheritance of permissions when creating folders(w/vbscript) and assigning permissions with iCACLS. A full explanation on how to do this would be enlightening as I can't find a clear description (for me at least) of how to do this task.

Thanks in advance.

1 Answer 1

2

I strongly suggest you find a utility called SetACL. It is much more powerful than ICACLS, plus the utility's website also provides a very good introduction to NTFS privileges.

(Sorry, I'm typing this on my smartphone, so I can't directly give you the site myself).

2
  • Thank you, user63709. This is SetACL's website: helgeklein.com Mar 7, 2011 at 20:09
  • @Helge : your welcome. I used your program extensively :) ... (I am user63709; for some strange reason my Google OpenID is not associated with MyOpenID here, while they were in StackOverflow)
    – pepoluan
    Mar 8, 2011 at 11:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .