Jump to content
Sign in to follow this  
ranhalt

Run MBSA through prompt

Recommended Posts

ranhalt

I've been trying to run MBSA (Microsoft Baseline Security Analyzer with AutoIT and have some strange issues with parameters not being sent through.

If I run the following command in Command Prompt, it will run with the following output and create a plain text file.

C:\Documents and Settings\Administrator>"C:\Program Files\Microsoft Baseline Security Analyzer 2\mbsacli.exe" /n OS+SQL+IIS+Password /nvc > C:\output.txt

--Correct screen output--

Microsoft Baseline Security Analyzer

Version 2.1.1 (2.1.2112.0)

© Copyright 2002-2009 Microsoft Corporation. All rights reserved.

Scanning...

1 of 1 computer scans complete.

Scan Complete.

--

This is how I'm running it with AutoIT, with ShellExecute. But it doesn't make the txt file, only the MBSA (XML) file in C:\Documents and Settings\Administrator\SecurityScans.

The screen output is exactly the same, but the parameter " > C:\output.txt" isn't being interpreted.

ShellExecuteWait("c:\Program Files\Microsoft Baseline Security Analyzer 2\mbsacli.exe", "/n OS+SQL+IIS+Password /nvc > c:\output.txt")

Anyone experienced with MBSA? Any thoughts? Thanks.

http://msdn.microsoft.com/en-us/library/aa302360%28classic%29.aspx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×