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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cacls > Query Directory Permissions

Status
Not open for further replies.
Apr 14, 2010
3
US
I am looking to use vbscript to query a directory for a specific groups permissions??

I have searched the internet for days now and I can not find ANYTHING that seems to help.

I am either looking to use vbs to directly query the directory/group permissions and generate a true/false statement or I am willing to do a vbs batch script call, this would run cacls and dump the results to a text file, then vbs would continue with an if statement to look for group, Built In\Administrators, and the associated file permission, F.


VBS Script Flow:
VBS executes >
Runs cacls.bat ( which executes cacls c:\WINDOWS\system32\config > %computername%_cacls.txt )
Then once the text file has been generated (perform a check for %computername%_cacls.txt) look through the lines for the user group Built In\Administrators.

If the Built In\Administrators:*F* then true (* = wildcard)
If the Built In\Administrators: does not have the property then false.



ANY AND ALL HELP IS GREATLY APPRECIATED, I am on a time table so HUGE thanks to anyone that replys.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top