"James" <> wrote in message
news:%...
>I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course 
>
> regardless, still interested in hearing about others experience using this
> and/or wmi for scripting ntfs permission managment tasks. I have not
> looked into the wmi route but do recall an example somewhere that looked
> overly complicated for the goal at hand... I'm thinking cacls is much
> simpler, with the only negative being I need to shell out from wsh.
I frequently use cacls from both command line and script. I use it
exclusively with the /E switch, which does not present a confirmation
prompt. In my case, I am just wanting to grant (or revoke) a specific user
from the directory or file. I am not concerned with altering other
permissions on the directory.
I also looked at the WMI method sometime back & came to the same
conclusion as you. It is indeed a lot of learning and work to accomplish
what shelling out to cacls could accomplish easily.