Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - managing NTFS permissions - cacls or wmi?

Reply
 
Old 11-14-2008   #1 (permalink)
James


 
 

managing NTFS permissions - cacls or wmi?

cacls or wmi for managing ntfs permissions?

I was going to go with cacls but having an issue using 'echo y | cacls...'
command? my cacls command is good, it works until I try to echo y into it so
it can go without user interaction. Anyone know whats up with that?

how is wmi for this? haven't looked yet, just looking for others opinions
based on their experiences using either of these

thanks



My System SpecsSystem Spec
Old 11-14-2008   #2 (permalink)
James


 
 

Re: managing NTFS permissions - cacls or wmi?

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.

thanks

"James" <noone@xxxxxx> wrote in message
news:Or$atypRJHA.4772@xxxxxx
Quote:

> cacls or wmi for managing ntfs permissions?
>
> I was going to go with cacls but having an issue using 'echo y | cacls...'
> command? my cacls command is good, it works until I try to echo y into it
> so it can go without user interaction. Anyone know whats up with that?
>
> how is wmi for this? haven't looked yet, just looking for others opinions
> based on their experiences using either of these
>
> thanks
>

My System SpecsSystem Spec
Old 11-16-2008   #3 (permalink)
Marcin


 
 

Re: managing NTFS permissions - cacls or wmi?

James - stick to cacls (try xcacls or icacls if you are running Vista).
While managing permissions via scripting (with or without WMI) is certainly
possible, such approach is considerably more complex and time consuming.
Check http://technet.microsoft.com/en-us/m.../cc160995.aspx to get a
taste of it...

hth
Marcin

"James" <noone@xxxxxx> wrote in message
news:%230IcIBqRJHA.5344@xxxxxx
Quote:

>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.
>
> thanks
>
> "James" <noone@xxxxxx> wrote in message
> news:Or$atypRJHA.4772@xxxxxx
Quote:

>> cacls or wmi for managing ntfs permissions?
>>
>> I was going to go with cacls but having an issue using 'echo y |
>> cacls...' command? my cacls command is good, it works until I try to echo
>> y into it so it can go without user interaction. Anyone know whats up
>> with that?
>>
>> how is wmi for this? haven't looked yet, just looking for others opinions
>> based on their experiences using either of these
>>
>> thanks
>>
>
>

My System SpecsSystem Spec
Old 11-16-2008   #4 (permalink)
James Whitlow


 
 

Re: managing NTFS permissions - cacls or wmi?

"James" <noone@xxxxxx> wrote in message
news:%230IcIBqRJHA.5344@xxxxxx
Quote:

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


My System SpecsSystem Spec
Old 11-17-2008   #5 (permalink)
David Trimboli


 
 

Re: managing NTFS permissions - cacls or wmi?

James wrote:
Quote:

> I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course
Just so you know: cacls also takes a /f (“force”) parameter to skip
confirmation.

--
David Trimboli
Windows Systems Analyst
Cold Spring Harbor Laboratory
My System SpecsSystem Spec
Old 11-17-2008   #6 (permalink)
James


 
 

Re: managing NTFS permissions - cacls or wmi?

thanks all for the great input. I appreciate it.

"James" <noone@xxxxxx> wrote in message
news:%230IcIBqRJHA.5344@xxxxxx
Quote:

>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.
>
> thanks
>
> "James" <noone@xxxxxx> wrote in message
> news:Or$atypRJHA.4772@xxxxxx
Quote:

>> cacls or wmi for managing ntfs permissions?
>>
>> I was going to go with cacls but having an issue using 'echo y |
>> cacls...' command? my cacls command is good, it works until I try to echo
>> y into it so it can go without user interaction. Anyone know whats up
>> with that?
>>
>> how is wmi for this? haven't looked yet, just looking for others opinions
>> based on their experiences using either of these
>>
>> thanks
>>
>
>

My System SpecsSystem Spec
Old 11-19-2008   #7 (permalink)
David


 
 

Re: managing NTFS permissions - cacls or wmi?

we use the following in a bacth file during our initial image building to
set it up.

xcacls.vbs c:\temp /t /e /g BUILTIN\USERS:F /E /I ENABLE
xcacls.vbs c:\temp /t /e /g "domain\DOMAIN USERS":F /E /I ENABLE

"James" <noone@xxxxxx> wrote in message
news:%230IcIBqRJHA.5344@xxxxxx
Quote:

>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.
>
> thanks
>
> "James" <noone@xxxxxx> wrote in message
> news:Or$atypRJHA.4772@xxxxxx
Quote:

>> cacls or wmi for managing ntfs permissions?
>>
>> I was going to go with cacls but having an issue using 'echo y |
>> cacls...' command? my cacls command is good, it works until I try to echo
>> y into it so it can go without user interaction. Anyone know whats up
>> with that?
>>
>> how is wmi for this? haven't looked yet, just looking for others opinions
>> based on their experiences using either of these
>>
>> thanks
>>
>
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Help with permissions (ntfs) Vista security
copy ntfs permissions VB Script
NTFS Permissions via VBScripting VB Script
how to list out ntfs permissions PowerShell
Copy NTFS permissions PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46