Most of us know that there are several ways to use programming/scripting to set NTFS security details on files and folders such as cacls.exe, xcacls.exe, xcacls.vbs, AdsSecurity.dll and the most recent (incorporated in XP and 2003) ADsSecurityUtility.

I chose ADsSecurityUtility after the problems with the above mentioned. This by far works best imo. The only problem I have in the order of inherited aces. I'll tell you first when the problem occurs. It occurs when you select a folder on a remote computer in the network even a folder on the server for instance: \\Server01\Share$\folder. It doesn't occur when you do in on your own computer in the network for instance \\LocalXP\c$\folder. The permissions on the Set folder are in perfect order (well perfect...) but once set, and you create a subfolder and look at the permissions on it they are out of order (windows says so)

The code itself is very sound. The only thing I need to know is the correct AceFlags to set permissions so the problems does NOT occur on \\Server01\Share\folder.
Can anyone please help me out ?

[edit] Removed the code, I'll post the changes in the first post. [/edit]


Edited by apronk (2006-02-23 02:40 PM)