Jump to content

sending variable to installation parameters


alkey
 Share

Go to solution Solved by dcat127,

Recommended Posts

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

Link to comment
Share on other sites

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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...