strFolder = "D:\CUSTOMER"
strAcl = "c:\XCACLS.vbs"
Set objShell = CreateObject("wscript.Shell")
Set objNetwork = WScript.CreateObject("WScript.Network")
Set objfso = CreateObject("scripting.filesystemobject")
Set ColFolder = objfso.GetFolder(strFolder)
Set ColSubfolders = Colfolder.SubFolders
For Each strShare In ColSubfolders
strCmd = "cscript " & strAcl & " " & strShare.Path & " /e /p users:l /spec a"
objshell.Run strCmd,0,true
Next
WScript.Echo "Done"
|