nevets2001uk
IS-IT--Management
I'm trying to script the running of MBSA so that I can schedule automatic monthly scans of our servers. I have a script that creates an output directory but when I try to run the executable with the required switches it fails.
I'm using the line
wshshell.run "%COMSPEC% /k ""C:\Program Files\Microsoft Baseline Security Analyzer 2\mbsacli.exe"" /target HUKEA1692-ici\HGBEAA01 /wa /nvc /qp /qt /rd ""\\HGBEAC02\Private\Information Technology Department\Administration\Logs""",1,true
The path the executable and the output directory for MBSA reports need to be in quotes to function (due to spaces in the path) and I though the double quotes should do the job. However in the cmd window that opens I get the error 'C:\Program' is not recognised as an internal or external command.
If I remove the output path section of the string it runs fine but won't save the log where I want it.
Any thoughts as this is bugging me now?
Steve G (MCSE / MCSA:Messaging)
I'm using the line
wshshell.run "%COMSPEC% /k ""C:\Program Files\Microsoft Baseline Security Analyzer 2\mbsacli.exe"" /target HUKEA1692-ici\HGBEAA01 /wa /nvc /qp /qt /rd ""\\HGBEAC02\Private\Information Technology Department\Administration\Logs""",1,true
The path the executable and the output directory for MBSA reports need to be in quotes to function (due to spaces in the path) and I though the double quotes should do the job. However in the cmd window that opens I get the error 'C:\Program' is not recognised as an internal or external command.
If I remove the output path section of the string it runs fine but won't save the log where I want it.
Any thoughts as this is bugging me now?
Steve G (MCSE / MCSA:Messaging)