DigDeep Posted October 20, 2015 Posted October 20, 2015 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.txtBut 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")
Developers Jos Posted October 20, 2015 Developers Posted October 20, 2015 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.
Moderators JLogan3o13 Posted October 20, 2015 Moderators Posted October 20, 2015 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!
DigDeep Posted October 20, 2015 Author Posted October 20, 2015 @JosIt worked. Thanks@JLogan3o13MBSA command lines won't work if admin rights are not given so #RequireAdmin is already added.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now