saldous Posted February 27, 2007 Posted February 27, 2007 Is there a limit on the amount of characters / variables that can be in a RunWait command? (and yes I looked in the help file first and couldn't find anything)I'm trying the following:runwait("msiexec /qn /i Setup.msi OPTION=0 EMAILADDRESS=" & $sEMAIL & " PASSWORD=" & $sPW1 & " TARGETDIR=" & $InstallFolder)It should produce this (confirmed by using the MSGBOX to display the same line:msiexec /qn /i Setup.msi OPTION=0 EMAILADDRESS=user@company.com PASSWORD=abc123 TARGETDIR=C:\Program Files\CustomApplication\My Application v1But I get the standard Windows Installer/MSI pop-up complaining that the command line was wrong. But if I type the same string into a Command prompt it works fine.However, if I shorten it to this:runwait("msiexec /qn /i Setup.msi OPTION=0 EMAILADDRESS=" & $sEMAIL & " PASSWORD=" & $sPW1)which produces this:msiexec /qn /i Setup.msi OPTION=0 EMAILADDRESS=user@company.com PASSWORD=abc123then it runs fine. So it there a limit and how can I raise the limit?Thanks.
Moderators SmOke_N Posted February 27, 2007 Moderators Posted February 27, 2007 (edited) Have you tried to wrap the install directory in double quotes?$sPW1 & ' TARGETDIR="' & $InstallFolder & '"'oÝ÷ ØGb´êæk&ÞºÇWzÔ¡¢»Mjg¢¸jëh×6$InstallFolder = FileGetShortName($InstallFolder) RunWait(ect...) Edited February 28, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
saldous Posted February 28, 2007 Author Posted February 28, 2007 Hi, whilst this solves the error message, it doesn't install my application in the correct directory using the long name. I guess I could use the script to make the directory first, then get the short name, and then reference this in the installer command line. But this seems like a long way around something that should work with the RunWait command.
/dev/null Posted February 28, 2007 Posted February 28, 2007 saldous said: msiexec /qn /i Setup.msi OPTION=0 EMAILADDRESS=user@company.com PASSWORD=abc123 TARGETDIR=C:\Program Files\CustomApplication\My Application v1your problem is the spaces in the TARGETDIR option. See HERE and HERETry ShellExecuteWait() instead of RunWait(). Maybe you'll still have to "single quote" the path. __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
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