Jump to content

MBSA command line


DigDeep
 Share

Recommended Posts

Hi,

Can someone please help out here.

If I run the below via command prompt as per below it runs all good.

C:\Program Files\Microsoft Baseline Security Analyzer 2> mbsacli /n Password+OS+SQL+IIS /wa /unicode > C:\Output.txt

But if I am trying to run the below command line via AutoIT it does not execute.

RunWait("C:\Program Files\Microsoft Baseline Security Analyzer 2\mbsacli.exe /n Password+OS+SQL+IIS /wa /unicode > C:\Output.txt")
Link to comment
Share on other sites

  • Developers

Something like this?

RunWait(@ComSpec & ' /c "C:\Program Files\Microsoft Baseline Security Analyzer 2\mbsacli.exe" /n Password+OS+SQL+IIS /wa /unicode > C:\Output.txt')

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

Since you're writing to the root of C, try adding #RequireAdmin to the top of your script

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...