Archive: Click finish button and try to run App, It keeps hanging..


Click finish button and try to run App, It keeps hanging..
I'm installing application. On the last page of the setup it goes to "Not responding"

In silent mode it just never exits. It keeps hanging and consumes 50% of CPU.

It's reproducible on both Win XP SP2 and Win Vista Business x64

Any thoughts?


James


The finish page and therefore the application execution are not shown in silent mode so the problem is elsewhere. Do you have code in .onInstSuccess?


yeah, I did. I have some code there:
Function .onInstSuccess
loop:
FindWindow $0 "WindowsForms10.Window.8.app.0.33c0d9d" ""
IsWindow $0 0 loop
System::Call 'user32::SetForegroundWindow(i r0)'
FunctionEnd

to catch our application window to bring it up front.
Any ideas?


Well, there you go... You have an infinite loop in there. It doesn't stop until the window is found. If the execution failed for some reason or the user closed the application before the installer found the window, it will never end.


yeah. i found this problem. How can i do. now I just use sleep 2000. and wait for our application window comes up and to catch it...is it ok?????


No, you can still enter an infinite loop. If you insist on keeping this loop, the best you can do is set a limit for it. For example, stop it after it tries to find that window and fails for 10 times.