Page 1 of 1

(WAIT) command not waiting

Posted: Tue Mar 10, 2009 12:31 pm
by ParallaxiT
I am using InstallAware V7 R2 demo, installing a .NET Windows forms appliction onto XP and Vista. All goes great and i am really impressed with the debugger and the ease of use.

My only complaint and what is stopping our purchase of the latest version is the (wait) command and functionality for third party software.

I call my first third party exe at the end of my main program install (line 386 in attached image) using the 'Run Program' command and the (WAIT) flag. It works correctly and goes onto the next install command.

The next is also a 'Run Program' with a (WAIT) flag but it does not wait (line 388 in image). It skips to the end and says the program is completed, 'do you wish to run'. The user says yes because the last exe hasn't even started yet but will pop up momentarily making the user to question what the heck this new program is (most think its a virus or malware etc).

How can we force the wait flag?

Lastly, how can i call these two programs uninstall when i uninstall the main program?

Cheers
and thanks for all the help!!

File Attached:

msi_code.JPG

Posted: Tue Mar 10, 2009 1:46 pm
by MichaelNesmith
This really isn't an InstallAware problem. Some setups, especially InstallShield, return immediately after spawning their engine. So, there's nothing that Run Program (As) can do about it.

However I remember that there used to be a command line switch which forced InstallShield itself to wait for real exit - so just ask your third party setup provider or even InstallShield for help with that.

OK ...

Posted: Tue Mar 10, 2009 2:27 pm
by ParallaxiT
I contacted the developers who made the third party installer, hopefully they have a workaround.

As for my seconds question, uninstalling the two third party programs. Should i look in registry and grab the uninstall string? Where would i put the logic?

Cheers

Posted: Tue Mar 10, 2009 3:11 pm
by MichaelNesmith
Yeah, read the registry and run before or after Apply Uninstall.

Posted: Tue Mar 10, 2009 3:22 pm
by ParallaxiT
Thanks Michael! Will let you know how it works.

Thanks for the quick replies! :lol:

Posted: Tue Mar 10, 2009 3:38 pm
by ParallaxiT
Last question on this thread. How would i loop until i get the return code i need. I found the location that it is stored at, i want to read it from the registry and break out of loop once i have found it.

Cheers!!

Posted: Tue Mar 10, 2009 4:18 pm
by MichaelNesmith
Label, GoTo Label, and probably Sleep in kernel32.dll via Call DLL Function.

Posted: Wed Mar 11, 2009 2:37 pm
by ParallaxiT
That worked like a charm. And i used the Sleep command to keep the UI responsive (user thinking the installer has crashed).

Thanks for the tip!

I have included a screenshot of the Sleep command wizard window to help anyone else looking into this.

Cheers

File Attached:

sleep_cmd.JPG

Posted: Wed Mar 11, 2009 5:57 pm
by bokkie
Nice one! I can make use of that. Thanks for the screenshot.