alkey Posted January 23, 2014 Posted January 23, 2014 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
Solution dcat127 Posted January 23, 2014 Solution Posted January 23, 2014 (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 January 23, 2014 by dcat127
mikell Posted January 23, 2014 Posted January 23, 2014 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)
jdelaney Posted January 23, 2014 Posted January 23, 2014 (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 January 23, 2014 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.
alkey Posted January 23, 2014 Author Posted January 23, 2014 Got it!Thanks to all!! You guys are amazing!
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