Sign in to follow this  
Followers 0
DigDeep

MBSA command line

4 posts in this topic

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")

Share this post


Link to post
Share on other sites



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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

@Jos

It worked. Thanks

@JLogan3o13

MBSA command lines won't work if admin rights are not given so #RequireAdmin is already added. :)

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  
Followers 0