Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can vbscript change NTFS permissions? 2

Status
Not open for further replies.

Rinnt

MIS
Feb 11, 2002
181
US
Hello everyone,

I was orginally under the impression that vbscript was only for web sites. However, a friend recently informed me otherwiese. Assuming they are capable if admiinistration work on NT 4.0 servers, I could use a script that will modify NFTS permissions. Here is the senario... I have a number of user directories that need their permissions changed to allow their user name (matches their directory) to have CHANGE and domain admins to have FULL CONTROL. But no other permissions should be applied...

Is this possible?

Another nice script would be one that changes the department folders so you could say something like:

C:\dept\finance Finance = Change Domain Admins = Full
C:\dept\mkting Marketing = Change Domain Admins = Full

and so on...

Thank you in advance!
 
You can definitely automate many administrative tasks with VBscript. I don't have one handy that does what you are requesting, but here are two very good resources:

"Windows Admin Scripting: Little Black Book" by Jesse M. Torres. Published by Coriolis.
and
"Windows Management Instrumentation (WMI)"
By Matthew M. Lavy, Ashley J. Meggitt published by New Riders.

The WMI books provides more in-depth, but "Windows Admin Scripting" has handy code to use. (I think it may be out-of-print, look for a used copy.)
 
have a look at using the dos utility cacls to achieve what you want. it is possible to write a simple script that accepts parameters and passes those to the cacls utilty. Jamie Gillespie
j-gillespie@s-cheshire.ac.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top