DigDeep Posted July 15, 2016 Share Posted July 15, 2016 (edited) Hi, May I please request someone to get this corrected? I think my Inverted commas are going incorrect and getting "Syntax Error". $Result = "C:\Temp\Updates.txt" RunWait(@ComSpec & " /c 'C:\Program Files\Microsoft Baseline Security Analyzer 2\MBSACLI' /n Password+OS+SQL+IIS /wa /unicode >" & $Result, "", @SW_SHOW) or anything to make it more shorter as: $Result = "C:\Temp\Updates.txt" $Scan = "C:\Program Files\Microsoft Baseline Security Analyzer 2" RunWait(@ComSpec & " /c " & $Scan & 'MBSACLI /n Password+OS+SQL+IIS /wa /unicode >' & $Result, "", @SW_SHOW) Edited July 15, 2016 by DigDeep Link to comment Share on other sites More sharing options...
orbs Posted July 15, 2016 Share Posted July 15, 2016 (edited) switch your quotes - external is single, internal is double. like this: RunWait(@ComSpec & ' /c "C:\Program Files\Microsoft Baseline Security Analyzer 2\MBSACLI" /n Password+OS+SQL+IIS /wa /unicode >' & $FilePath1, "", @SW_SHOW) Edited July 15, 2016 by orbs DigDeep 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
DigDeep Posted July 15, 2016 Author Share Posted July 15, 2016 still the same error. Link to comment Share on other sites More sharing options...
orbs Posted July 15, 2016 Share Posted July 15, 2016 works for me... what error exactly are you getting? Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
DigDeep Posted July 15, 2016 Author Share Posted July 15, 2016 (edited) Error... Edited July 15, 2016 by DigDeep Link to comment Share on other sites More sharing options...
orbs Posted July 15, 2016 Share Posted July 15, 2016 what have you got before and after that line? anything on the output pane? Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
DigDeep Posted July 15, 2016 Author Share Posted July 15, 2016 Yeah I have loads of lines. I commented all and now it shows up good. Thank you. Link to comment Share on other sites More sharing options...
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