Sign in to follow this  
Followers 0
DanteMay

Install script

14 posts in this topic

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

Share this post


Link to post
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.

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

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


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
9 minutes ago, DanteMay said:

 But this isnt a full install rather a custom install

But this shouldn't be full install.... 

 

where is the edit button? :mellow:

Share this post


Link to post
Share on other sites

works this like a silent installation?

Share this post


Link to post
Share on other sites

@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?


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

#10 ·  Posted

i can't try this yet^^ the programm files are on work and im at home^^ i will test it tomorrow. thanks until here :)

Share this post


Link to post
Share on other sites

#11 ·  Posted

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

Share this post


Link to post
Share on other sites

#12 ·  Posted

(I haven't found the edit button yet...pls help :/)

How does 'WinWait' works?
Is it really wait until the Window is open with the paramter or is this like batch aka "I will work row for row. i don't care if the process ready yet."

Share this post


Link to post
Share on other sites

#13 ·  Posted

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.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Finaly the script works. but i haven't use the class:button thingy rather the normal ID
example:

ControlClick("title", "text", 25309, "left")

Thanks a lot :D
edit: YESSS finaly I have an edit button :3

Edited by DanteMay

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