Jump to content

AutoIt just quits during Installation


Recommended Posts

Hi there,

another little problem from my side...

I got a short little script to automate an installation procedure.

Everything is fine till the end, then the script just completly quits... it isn't any more in the systray and if I got the source-code open it just shuts down itself.

The behaviour occurs just when I get the message "Installation successfull".

Do you have any idea what I can do to find out what's wrong?

I don't think it has anything to do with my script, since it's pretty simple:

Run("W:\setup.exe +u" & $test& "+p" & $test2)
WinWaitActive("Question", "You asked for installation of user") 
ControlSend("Question", "", "", "{ENTER}")

;This is were the whole autoit process just shuts itself down... 

WinWaitActive("Restarting Windows","")
ControlSend("Restarting Windows", "", "", "{DOWN}" & "{ENTER}")

MsgBox("", "Test", "Test")
Exit

Any ideas?

Link to comment
Share on other sites

Hi there,

another little problem from my side...

I got a short little script to automate an installation procedure.

Everything is fine till the end, then the script just completly quits... it isn't any more in the systray and if I got the source-code open it just shuts down itself.

The behaviour occurs just when I get the message "Installation successfull".

Do you have any idea what I can do to find out what's wrong?

I don't think it has anything to do with my script, since it's pretty simple:

Run("W:\setup.exe +u" & $test& "+p" & $test2)
WinWaitActive("Question", "You asked for installation of user") 
ControlSend("Question", "", "", "{ENTER}")

;This is were the whole autoit process just shuts itself down... 

WinWaitActive("Restarting Windows","")
ControlSend("Restarting Windows", "", "", "{DOWN}" & "{ENTER}")

MsgBox("", "Test", "Test")
Exit

Any ideas?

You said it shuts down when it says "Installation successful"? 'It' being the application being installed?

Do you have the full Scite installed? If so run it from Scite and look at the 'debug' box. See if it's crashing. There is also a directive you can use called '#AutoIt3Wrapper_Run_Debug_Mode=y'. Place it at the top and look what's happening=)

Link to comment
Share on other sites

Hi Szhlopp,

the message "Installation successfull" comes from the exe I ran at the beginning. So when this installation procedure ends somehow it also quits my script.

Thanks for the hint with the debug mode, I didn't knew that, but it didn't help.

I'm using scite and normally I'm running my scripts directly from scite pressing F5. Then the script starts and in the systray the autoit-icon appears, telling me that it's running... and as I wrote above, on the step >> WinWaitActive("Restarting Windows","") << it takes some time till the exe I started at the beginning acutally shows this window, but my script is all the while waiting, until the exe makes the installation successfull window. Then the script just completly quits... both scite and the icon in the tray disappears and that's it... you know what I mean? :D

With the debug mode I could see the same as I already guessed... everything is fine, my script is waiting for the specific window and then everything just quits.

Any more ideas how to troubleshoot this problem?

I also found out that at the same time, two more programs of mine, running in the background were quit. Do I run the exe file without the script everything is fine and nothing quits... so I think it must have something to do with autoit... but what? :D

Link to comment
Share on other sites

  • Developers

Isn't your setup program initiating a Windows Restart at the time you do the ControlClick() causing all applications to be signaled to quit?

This can be checked in your autoit3 script by adding a Func OnAutoItExit ( ) and testing the #ExitCode value.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hi Jos,

acutally the window with the text "installation successfull" is called "Question" and comes from the application I started. When I click OK for this message another message comes up called "Windows restart"... that's why I made the WaitWinActive.

So for you question (because I thought the same thing in the beginning...) it can't be, because some apps (including autoit) are quiting out when the window for the successfull installation pops up. I can then manually click OK and get the window "Restarting Windows".

I'm not exactly sure how to use this func since I'm a bit new to all this... :D

I will try some things... perhaps meanwhile you could give me some hints? :D

Link to comment
Share on other sites

  • Developers

I'm not exactly sure how to use this func since I'm a bit new to all this... :D

I will try some things... perhaps meanwhile you could give me some hints? :D

Assume you mean the Func OnAutoItExit ( ) here. The helpfile has a separate helppage for it with example.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Look for OnAutoItStart in the index.

Open the page and look under Related.

Or Open Search page. Type OnAutoItExit and hit Search. Second Hit.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Gnaaa - my fault.

I got a german help file and (obviously) searched this one but couldn't find something related...

I now checked the english help file and found what you mean. Think that can help me... thanks a bunch, I will now take a look with this :D

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