Login | |
|
 |
Re: Setting folder permissions in WSH - 3/15/2005 12:51:20 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
What do you have so far?
|
|
| |
|
|
|
 |
Re: Setting folder permissions in WSH - 3/15/2005 11:55:43 PM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
I agree with Token. If it works in a bat with calcs use that. We use cacls.exe to set folder permissions where I work.
|
|
| |
|
|
|
 |
Re: Setting folder permissions in WSH - 3/15/2005 11:59:51 PM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
Ok, I new I had a script from MS doing this and hopefully I can get it all to post. Not sure if there is a limit on length (over 4K lines) but I am going to try. If I can find a link to the script I will edit this post. Ok, I found that link. http://support.microsoft.com/?id=825751
|
|
| |
|
|
|
 |
Re: Setting folder permissions in WSH - 3/16/2005 5:48:22 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
I have not used that script myself so am not sure what would need to be done to incorporate it into your script, but I think that you would call it in a command line from your script just like you would call calcs.exe.
|
|
| |
|
|
|
 |
Re: Setting folder permissions in WSH - 3/16/2005 11:18:28 PM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
quote: Originally posted by killr0y Ok, I got my script finished but XCACLS isn't working quite the way it should. The only way I could figure out how to make it work was to do a shell.Run to launch the external XCACLS.VBS. The problem with this is that as soon as one shell.Run executes, it goes to the next one before it finishes.. This causes 3 instances of XCACLS to run in parallel which XCACLS apparently doesn't like, so none of the permissions wind up changing. Any ideas?
Use wait on return. Shell.Run "xcacls.vbs",1,TRUE
|
|
| |
|
|
|
 |
Re: Setting folder permissions in WSH - 3/16/2005 11:21:22 PM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
quote: Originally posted by killr0y
quote: Originally posted by token
quote: Originally posted by mbouchard ... but I think that you would call it in a command line from your script just like you would call calcs.exe.
heh.. so why bother getting another vbs file that does the same work as cacls ? Is there a reason why you don't want to use cacls.exe to simply your work ?
I have to use XCACLS because CACLS doesn't support the /I flag which turns off permission inheritence.. unless theres a new version of CACLS that I don't know about.
There is a new version of cacls from the 2k res kit [url]http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/xcacls-o.asp[/url
|
|
| |
|
|
|
|
|