Sign in to follow this  
Followers 0
saldous

RunWait limit?

4 posts in this topic

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 v1

But 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=abc123

then it runs fine. So it there a limit and how can I raise the limit?

Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

msiexec /qn /i Setup.msi OPTION=0 EMAILADDRESS=user@company.com PASSWORD=abc123 TARGETDIR=C:\Program Files\CustomApplication\My Application v1

your problem is the spaces in the TARGETDIR option. See HERE and HERE

Try 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 *

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