Jump to content

Recommended Posts

Posted

I have an install that I'm trying to deploy on both 32 bit and 64 bit machines. Trying to move more to 64 bit but still curious about making this work for both at the same time.

This is the 32 bit version of the script. I tried to make this same script work for a 64 bit install but realized the button IDs were different. Same install exe though.

What's the smart way to detect the buttonIDs based on the OS architecture? I thought possibly having the button ID as a variable with case selects but I wasn't quite sure how to pull it off.

 

#Region
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#EndRegion

#include <FileConstants.au3>
#include <MsgBoxConstants.au3>

Run("\\servername\cofs\Organization\ITS\_Software & Hardware\AS400\DVD\Windows\cwblaunch.exe")
;WinWaitActive("Security Warning","",5)
;ControlClick("Open File - Security Warning","&Run",4426,"left",1)


WinWaitActive("Choose Setup Language","",5)
sleep(500)
ControlClick("Choose Setup Language","OK",1006,"left",1)
Do
    Sleep(10)
Until ControlCommand("IBM i Access for Windows 7.1 - InstallShield Wizard","&Next >","Button1","IsEnabled")
sleep(500)
;MsgBox($MB_OK,"Control Command Found","Sent for first wait hang")
ControlClick("IBM i Access for Windows 7.1 - InstallShield Wizard","&Next >",23467,"left",1)
sleep(500)
ControlClick("IBM i Access for Windows 7.1 - InstallShield Wizard","I &accept the terms in the license agreement",22951,"left",1)
sleep(500)
ControlClick("IBM i Access for Windows 7.1 - InstallShield Wizard","&Next >",23467,"left",1)
sleep(500)
ControlClick("IBM i Access for Windows 7.1 - InstallShield Wizard","&Next >",23467,"left",1)
sleep(500)
ControlClick("IBM i Access for Windows 7.1 - InstallShield Wizard","&Next >",23467,"left",1)
sleep(500)
ControlClick("IBM i Access for Windows 7.1 - InstallShield Wizard","&Next >",23467,"left",1)
sleep(500)
ControlClick("IBM i Access for Windows 7.1 - InstallShield Wizard","&Install",23546,"left",1)
;Wait for finish button to appear
Do
   $Finish = ControlGetHandle("IBM i Access for Windows 7.1 - InstallShield Wizard", "Finish", 23500)
   Sleep(100)
Until $Finish <> ""
sleep(500)
ControlClick("IBM i Access for Windows 7.1 - InstallShield Wizard", "Finish", 23500,"left",1)
;Start second part of install
Run("\\servername2\Apps$\AutoIT\AS400\AS400_2 Patch_1.exe"

 

Posted
3 minutes ago, InunoTaishou said:

What is cwblaunch.exe? Do you have the website url for it? There's probably a silent installation for it as well as a x64 or x86 parameter.

It's an ancient mainframe software. I doubt it actually does but I can contact our vendor to see. 

Posted (edited)

Thanks @MilesAhead

These are the command line parameters that we want.

The /v/qn parameter is a silent install and should do what you want.

ShellExecute("\\servername\cofs\Organization\ITS\_Software & Hardware\AS400\DVD\Windows\cwblaunch.exe", "/v/qn")

And these look like some more command line parameters based on what to install. If you use any of these ones then use the double quotes in the parameter so it'd look like this:

ShellExecute("\\servername\cofs\Organization\ITS\_Software & Hardware\AS400\DVD\Windows\cwblaunch.exe", '"/v/qn ADDLOCAL=ALL"')

 

Edited by InunoTaishou
Posted
2 hours ago, InunoTaishou said:

Thanks @MilesAhead

These are the command line parameters that we want.

The /v/qn parameter is a silent install and should do what you want.

ShellExecute("\\servername\cofs\Organization\ITS\_Software & Hardware\AS400\DVD\Windows\cwblaunch.exe", "/v/qn")

And these look like some more command line parameters based on what to install. If you use any of these ones then use the double quotes in the parameter so it'd look like this:

ShellExecute("\\servername\cofs\Organization\ITS\_Software & Hardware\AS400\DVD\Windows\cwblaunch.exe", '"/v/qn ADDLOCAL=ALL"')

 

If I run it at the command line level I get the error that it's not a valid Win32 application.

Posted (edited)
On 3/4/2016 at 10:23 AM, InunoTaishou said:

Thanks @MilesAhead

These are the command line parameters that we want.

The /v/qn parameter is a silent install and should do what you want.

ShellExecute("\\servername\cofs\Organization\ITS\_Software & Hardware\AS400\DVD\Windows\cwblaunch.exe", "/v/qn")

And these look like some more command line parameters based on what to install. If you use any of these ones then use the double quotes in the parameter so it'd look like this:

ShellExecute("\\servername\cofs\Organization\ITS\_Software & Hardware\AS400\DVD\Windows\cwblaunch.exe", '"/v/qn ADDLOCAL=ALL"')

 

Ok, awesome, I had to dig to find the right setup.exe according to the documentation but I got it to run. However, it pops up with this dialog box (attached) showing me the command line parameters, as if I'm incorrect.  installshield.JPG

It continues to run the install however, but seemingly without any of the command line parameters.

Here's the command I entered into the CMD prompt exactly:

"\\servername\cofs\Organization\ITS\_Software & Hardware\AS400\DVD\Windows\image64a\setup.exe",'"/v/qn ADDLOCAL=ALL"'

 

Edited by theak
  • 2 weeks later...

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
×
×
  • Create New...