Sign in to follow this  
Followers 0
alkey

sending variable to installation parameters

5 posts in this topic

Hi,

I’m trying to package an application that requires a specific serial number for each install. I have a line to display an inputbox for the serial number but my trouble is passing that number into the actual install command right after PIDKEY=:

$Serial = InputBox("ACL_ACLAnalytics10_Desktop_NonUnicode_10.0.2", "Enter your Serial Number.", "", "", 275, 125, "900", "50")

Run(@ComSpec & ' /c "C:tempACLACLAnalytics10_Desktop_NonUnicode_10.0.2setup.exe /s /v"/qn PIDKEY=' $Serial" , @SystemDir, @SW_HIDE)

Sounds simple but I’m very new to Autoit. Any help is much appreciated.

Thanks,

Al

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

you forgot to join the string with the &

Run(@ComSpec & ' /c "C:\temp\ACL\ACLAnalytics10_Desktop_NonUnicode_10.0.2\setup.exe /s /v"/qn PIDKEY=' &$Serial, @SystemDir, @SW_HIDE)
Edited by dcat127

Share this post


Link to post
Share on other sites

There is also a quote problem

I always got nightmares with quotes in Run instructions... maybe try this

Run(@ComSpec & ' /c "C:\temp\ACL\ACLAnalytics10_Desktop_NonUnicode_10.0.2\setup.exe /s /v"/qn PIDKEY=' & $Serial & '""' , @SystemDir, @SW_HIDE)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Set the run string to a variable, and output it to consolewrite to see exactly what you are sending:

$Serial = "something"
$sRun = @ComSpec & ' /c "C:\temp\ACL\ACLAnalytics10_Desktop_NonUnicode_10.0.2\setup.exe" /s /v /qn PIDKEY=' & $Serial
ConsoleWrite($sRun & @CRLF)

output:

C:Windowssystem32cmd.exe /c "C:tempACLACLAnalytics10_Desktop_NonUnicode_10.0.2setup.exe" /s /v /qn PIDKEY=something

You can then use the variable in the Run:

$Serial = "something"
$sRun = @ComSpec & ' /c "C:\temp\ACL\ACLAnalytics10_Desktop_NonUnicode_10.0.2\setup.exe" /s /v /qn PIDKEY=' & $Serial
ConsoleWrite($sRun & @CRLF)
Run($sRun,@SystemDir,@SW_HIDE)

You might need the " around the params as well.  If the above doesn't work, use:

$sRun = @ComSpec & ' /c "C:\temp\ACL\ACLAnalytics10_Desktop_NonUnicode_10.0.2\setup.exe /s /v /qn PIDKEY=' & $Serial & '"'
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Got it!Thanks to all!! You guys are amazing! :thumbsup:

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