Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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).

share|improve this answer
Thank you, user63709. This is SetACL's website: – Helge Klein Mar 7 '11 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 '11 at 11:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.