twdeveloper
Programmer
If one of the permission doesn't match then it should exit out with a specific output (i.e. "Nonmatch" or simply "1"). If they do match then exit out with a 0, extra permissions can be ignored. I am using SubinAcl to get the Permissions. However the script that I have developed display all permissions for the files and shares and produces no output code. I need my script to check the particular files and shares for 'builtin\authenticated users. If that permission is there then return 0, if not there then output 1. Can anybody lend me a hand with the correct scripting to complete this? I would appreciate it.
The following Script is what I have come up with so far:
' Test Script
Dim fso
Dim ws
set fso = createObject ("scripting.filesystemobject")
set ws = WScript.CreateObject("WScript.Shell")
thisfolder = Left( WScript.ScriptFullName, Len(WScript.ScriptFullName) - Len(WScript.ScriptName) ) 'this ends with a \
'Display Test Script
target = chr(34) & thisfolder & "subinacl" & Chr(34) & " /outputlog=C:\TEMP\logfile_Test_Script.txt /file C:\TestFile /verbose /display"
'WScript.Echo target
ws.Run target, 1, True
'Display Test Share
target = chr(34) & thisfolder & "subinacl" & Chr(34) & " /outputlog=C:\TEMP\logfile_TestScript.txt /share TestShare$ /verbose /display"
'WScript.Echo target
ws.Run target, 1, True
The following Script is what I have come up with so far:
' Test Script
Dim fso
Dim ws
set fso = createObject ("scripting.filesystemobject")
set ws = WScript.CreateObject("WScript.Shell")
thisfolder = Left( WScript.ScriptFullName, Len(WScript.ScriptFullName) - Len(WScript.ScriptName) ) 'this ends with a \
'Display Test Script
target = chr(34) & thisfolder & "subinacl" & Chr(34) & " /outputlog=C:\TEMP\logfile_Test_Script.txt /file C:\TestFile /verbose /display"
'WScript.Echo target
ws.Run target, 1, True
'Display Test Share
target = chr(34) & thisfolder & "subinacl" & Chr(34) & " /outputlog=C:\TEMP\logfile_TestScript.txt /share TestShare$ /verbose /display"
'WScript.Echo target
ws.Run target, 1, True