As part of a much larger script I am trying to get some of the Local
security settings on a server using the DUMPSEC program. The program
resides on the local systemdrive of the server, though I would prefer
running it from the mapped drive where the script resides. In either
case my code does not run the program. If I run the command from the
command line the output file is created. When I run the following
code the script hangs and the output file is never created.
Set objShell = CreateObject("WScript.Shell")
strRunStmt = "%COMSPEC% c:\scripts\DUMPSEC.exe /rpt=POLICIES /
showaudit /saveas=CSV /outfile=c:\scripts\report.txt /noowner"
objShell.Run strRunStmt,,True
Can someone shed some light on what I am doing wrong here?
Thanks.