prmanningham Posted November 27, 2012 Share Posted November 27, 2012 Hi guys, I'm having some issue with arguments here. I have this batch file that works fine and I would like to convert to autoit : "\\server\setup.exe" /s /v"/qn ALLUSERS=1 LEI_SILENT=1 PIDKEY=XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX LEI_ACDID_EMAIL=my@email.com LEI_ACDID_PWD=Password SERVER=server PORT=6319" Unfortunately, the quotes in the arguements seem to be causing problems : $setup = "setup.exe" Run( $setup & " /s /v"/qn ALLUSERS=1 LEI_SILENT=1 PIDKEY=XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX LEI_ACDID_EMAIL=my@email.com LEI_ACDID_PWD=Password SERVER=server PORT=6319"" ) ProcessWaitClose ( $setup ) Would you have any suggestion in how to handle quotes in this context? Thanks in advance! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 27, 2012 Moderators Share Posted November 27, 2012 (edited) I always use a single quote for outer, and double quotes inside. Helps distinguish things: Run( $setup & '/s /v"/qn ALLUSERS=1 LEI_SILENT=1 PIDKEY=XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX LEI_ACDID_EMAIL=my@email.com LEI_ACDID_PWD=Password SERVER=server PORT=6319"' ) Edited November 27, 2012 by JLogan3o13 "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 More sharing options...
prmanningham Posted November 28, 2012 Author Share Posted November 28, 2012 awesome, thanks for the fast support! Link to comment Share on other sites More sharing options...
DicatoroftheUSA Posted November 28, 2012 Share Posted November 28, 2012 (edited) I would also load each argument into a variable for easy manipulation. eg $sServer='server' $iPort=6319 ...SERVER='&$sServer&' PORT='&$iPort Edited November 28, 2012 by DicatoroftheUSA Statism is violence, Taxation is theft. Autoit Wiki 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