Jump to content

Install script


 Share

Recommended Posts

Good day/night guys

First of all: sorry for my bad english :D

 

I try to write a script to install odbc driver for IBM updates.

The first steps are ready but there is big problem:

after the first few screens (script works fine) come some screens with progress bars which automatically close. 

The next screen is window with 'next' and 'cancel' again. At this step doesnt work the script.

Is there a command for ...uhm.... bridging?

 

i mean the screens between picture 1 (namend 1 :D) and picture 2 (namend 2 :D)

 

jesus....this english is terrible...

1.PNG

2.PNG

Link to comment
Share on other sites

Hi DanteMay, and welcome to the forum. I would guess that your script is running into window focus issues, but it would be really helpful if you could post your code so that we could have a look at it. I'm pretty sure you can fix this with the right combination of WinWait commands, but I'll need to see your script to be able to offer any constructive help.

Link to comment
Share on other sites

Run("cwblaunch.exe")
WinWait("Setup-Sprache auswählen", "Wählen Sie die Sprache")
WinActivate("Setup-Sprache auswählen", "Wählen Sie die Sprache")
ControlClick("Setup-Sprache auswählen", "Wählen Sie die Sprache", "OK", "left")
;<--at this point is the problem
WinWait("IBM i Access für Windows 7.1 - InstallShield Wizard", "Der InstallShield(R) Wizard wird IBM i Access")
WinActivate("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access")
ControlClick("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access", 1, "left")
WinWait("IBM i Access", "Lizenzvereinbarung")
WinActivate("IBM i Access", "Lizenzvereinbarung")
ControlSend("IBM i Access", "Lizenzvereinbarung", 1032, "{UP}" & "{Space}")
ControlClick("IBM i Access", "Lizenzvereinbarung", "Weiter", "left")
WinWait("IBM i Access", "Zielordner")
WinActivate("IBM i Access", "Zielordner")
ControlClick("IBM i Access", "Zielordner", "Weiter", "left")
WinWait("IBM i Access", "Primärsprache")
WinActivate("IBM i Access", "Primärsprache")
ControlClick("IBM i Access", "Primärsprache", "Weiter", "left")
WinWait("IBM i Access", "Setuptyp")
WinActivate("IBM i Access", "Setuptyp")
ControlSend("IBM i Access", "Setuptyp", 1032, "{DOWN}" & "{Space}")
ControlClick("IBM i Access", "Setuptyp", "Weiter", "left")
WinWait("IBM i Access", "Eingeschränkte Features")
WinActivate("IBM i Access", "Eingeschränkte Features")
ControlClick("IBM i Access", "Eingeschränkte Features", "Weiter", "left")
WinWait("IBM i Access", "Setup")
WinActivate("IBM i Access", "Setup")
ControlSend("IBM i Access", "Setup", 1032, "{DOWN 3}" & "{Space}")
ControlSend("IBM i Access", "Setup", 1032, "{DOWN 3}" & "{Space}")
ControlClick("IBM i Access", "Setup", "Weiter", "left")
WinWait("IBM i Access", "Programm zu installieren")
WinActivate("IBM i Access", "Programm zu installieren")
ControlClick("IBM i Access", "Programm zu installieren", "Installieren", "left")
WinWait("IBM i Access", "abgeschlossen")
WinActivate("IBM i Access", "abgeschlossen")
ControlClick("IBM i Access", "abgeschlossen", "Fertigstellen", "left")

dont blame me :D i've started today with this script language :)

Link to comment
Share on other sites

  • Moderators

@DanteMay the driver is written in InstallShield, which means it supports command line parameters to install it silently. I believe 7.1 supports the /S and /V switches, which will keep you from having to manipulate the GUI.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

My first idea was a batch file. But this isnt a full install rather a custom install....this was the breakpoint. I was too stupid for this :D. The complete install works great as a batch file with /s and /v but this wasn't the task. Can i use these parameters in AutoIt and can install as a custom install?

Link to comment
Share on other sites

  • Moderators

Yes you can use those parameters in AutoIt. Use ShellExecute:

ShellExecuteWait(<path to executable>, '/S')

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

@DanteMay it would probably take you less time to try it yourself than it does to post the question ;) Have you tried the suggestion given?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

I am back! uhm...SchellExecuteWait doesn't work. Same probleme like before: after the 'select language'-screen come progress bars and in the next screen it stopped. 

I've tried several parts: 
1. I had run the script with only 

ShellExecuteWait("cwblaunch.exe", '/S')

2. I had run the command after run

Run("cwblaunch.exe")
ShellExecuteWait("cwblaunch.exe", '/S')
WinWait("Setup-Sprache auswählen", "Wählen Sie die Sprache")
WinActivate("Setup-Sprache auswählen", "Wählen Sie die Sprache")
ControlClick("Setup-Sprache auswählen", "Wählen Sie die Sprache", "OK", "left")
WinWait("IBM i Access für Windows 7.1 - InstallShield Wizard", "Der InstallShield(R) Wizard wird IBM i Access")
WinActivate("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access")
ControlClick("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access", 1, "left")
WinWait("IBM i Access", "Lizenzvereinbarung")
[...]

(why is blue and red so rnd? :D)
I thought ShellExecuteWait took over the part of run, so i came to the next...

3. I had run the command at first
 

ShellExecuteWait("cwblaunch.exe", '/S')
WinWait("IBM i Access für Windows 7.1 - InstallShield Wizard", "Der InstallShield(R) Wizard wird IBM i Access")
WinActivate("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access")
ControlClick("IBM i Access", "Der InstallShield(R) Wizard wird IBM i Access", 1, "left")
WinWait("IBM i Access", "Lizenzvereinbarung")
[...]

 

i feel a little bit silly...

Link to comment
Share on other sites

check the help file in autoit for winwait and controlclick.

6 hours ago, DanteMay said:

ControlClick("Setup-Sprache auswählen", "Wählen Sie die Sprache", "OK", "left")

ControlClick should be like this

ControlClick ( "MyProgram", "", "[CLASS:Button; INSTANCE:4]","left", 1)

use the AutoIt Window Info for ControlID

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

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...