Jump to content

Script doesn't pause


 Share

Recommended Posts

Hello,

I have another problem with my unattended software installation.

During the process, a windows pops up and show me the state of copying files.

If I ignore this windows in my script, the files won't copy.

So I have to tell my script, that it have to wait till the files are copied.

Hier is my script:

run("setup.exe")
WinWait("Willkommen zur Installation")
ControlClick("Willkommen zur Installation", "Fortsetzen", "Button1")
WinWait("Verzeichnis")
ControlSetText("Verzeichnis", "", "Edit1", "C:\Software\Agenda")
ControlClick("Verzeichnis", "OK", "Button1")
WinWait("Verzeichnis erstellen ?")
;This is the last to do until the window will pop up
ControlClick("Verzeichnis erstellen ?", "Ja", "Button1")

; Here is the window, which follows
[attachmentid=822]

;I tried the three functions below:
WinWaitActive("Installation läuft ...")
;WinWaitClose("Installation läuft ...", "", 5)
;WinWaitClose("Installation läuft ...")

;This is the window after the installation process:
WinWait("Zugang - Menüverwaltung")

I hope, anybody could help me

Thanks

Björn

Link to comment
Share on other sites

Try to add this to check if the window is still opened:

run("setup.exe")
WinWait("Willkommen zur Installation")
ControlClick("Willkommen zur Installation", "Fortsetzen", "Button1")
WinWait("Verzeichnis")
ControlSetText("Verzeichnis", "", "Edit1", "C:\Software\Agenda")
ControlClick("Verzeichnis", "OK", "Button1")
WinWait("Verzeichnis erstellen ?")
;This is the last to do until the window will pop up
ControlClick("Verzeichnis erstellen ?", "Ja", "Button1")

; Here is the window, which follows
[attachmentid=822]

;check if window exists every 1 second
$i = 1
While $i = 1
    $i = WinExists("Installation läuft ...")
    Sleep(1000)
WEnd


;This is the window after the installation process:
WinWait("Zugang - Menüverwaltung")

Hope it helps

CheersNobby

Link to comment
Share on other sites

It doesn't work.

In my opinion, autoit doesn't recognize the window "Installation läuft...".

If I install the software without the script, the windows "Installation läuft..." appears and after 3-4 seconds the window "Zugang Menüverwaltung" appears.

Why doesn't appear the window "Installation läuft..."?

Where could be the difference between manual and unattended?

How could I find out which windows appear between "Verzeichnis erstellen ?" and "Zugang Menüverwaltung"?

Björn

Link to comment
Share on other sites

If I ignore this windows in my script, the files won't copy.

So I have to tell my script, that it have to wait till the files are copied.

So the window "Installation läuft" has to be activated and up front for the installation to continue?

CODE

$i = 1

While $i = 1

$i = WinExists(Installation läuft")

WinActivate(Installation läuft")

Sleep(1000)

WEnd

Maybe that would help?

In my opinion, autoit doesn't recognize the window "Installation läuft...".

WindowSpy!!! Try that. If you can get text from window spy, then AutoIt can see and manipulate it.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

CODE

$i = 1

While $i = 1

    $i = WinExists(Installation läuft")

    WinActivate(Installation läuft")

    Sleep(1000)

WEnd

It's nearly the same, I tried before. The function WinExists() doesn't get the window, because it doesn't appear.

WindowSpy!!!  Try that.  If you can get text from window spy, then AutoIt can see and manipulate it.

In the regular installation the window "Installation läuft..." appears and WindowSpy can see it.

Björn

Link to comment
Share on other sites

Try using the classname of the window then as a last-ditch effort. I have a program that I have to access via classname instead of window title......

AutoItSetOption("WinTitleMatchMode",4)
WinActivate("classname=blahblah")

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Why doesn't appear the window "Installation läuft..."?

I would concentrate on this section:

;This is the last to do until the window will pop up
ControlClick("Verzeichnis erstellen ?", "Ja", "Button1")

That seems to be the section that is not making the next window even appear.

Once you get the script to make the proper window appear,

try this slight change: (was missing some ")

WinWait("Installation läuft")
While WinExists("Installation läuft") = 1
    Sleep(200)
WEnd

later....

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

I have a new guess:

The setup.exe uses a setup.ini. In the setup.ini the destination folder and the files to be copied are named. If I install the software manually the destination (of the .ini-file) is used. If I install with autoit, the destination isn't used.

So if I install with autoIt the setup-program doesn't use the setup.ini and so the setup-program doesn't know the files to be copied.

How can I tell the setup-programm to use the setup.ini?

Thanks

Link to comment
Share on other sites

I have resolved the problem :idiot:

The problem was that the setup.exe hadn't found the setup.ini. So I run the setup.exe as follows:

run("full qualified setup.exe path", "full qualified setup-Dir")

So the setup knows, where it can find the setup.ini and so it knows which files have to be copied.

But there is another problem:

How can I find out the driveletter of the cdrom during the installation?

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