Dim strHomeFolder
Dim intRunError, objShell, objFSO
strHomeFolder = "C:\Program Files\X"
Set objShell = CreateObject("Wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strHomeFolder) Then
intRunError = objShell.Run("%COMSPEC% /k cacls """ & strHomeFolder & """ /e /c /g everyone:F ", 2, True)
End If
|