cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
worker-g
Level 5

Long pause when returning from a UninstallApplication

Hi,

I just upgraded from IS12 to IS2008. After the upgrade, I noticed when I uninstall an application from installscript. It takes a long time (about 10 to 20 secs) to return from the UninstallApplication call.

I use the call below:

UninstallApplication(,"/clone_wait",LAAW_OPTION_WAIT);

It used to work fine in IS12... anyone come across this or have any ideas on how to fix this?

Thanks
Labels (1)
0 Kudos
(10) Replies
ch029448
Level 4

I'm sorry I don't have any constructive advice for you, but I just wanted to say that I noticed this as well.

Furthermore, when uninstalling through Control Panel's Add/Remove, there's a similar delay not only when the progress bar reaches the end, but when the Add/Remove window re-populates to reflect that the software you just uninstalled is now gone from the list.
0 Kudos
worker-g
Level 5

Yeah... its a problem... does any one know how to get around this?
0 Kudos
esiemiat
Level 9

Could this be related to the /CLONE_WAIT switch? I have noticed considerable slow down when using this switch. Would the LAAW option to wait for a child process work for you instead.
0 Kudos
worker-g
Level 5

Is this what you mean? Today I tried the lines below:

RegDBGetUninstCmdLine ( , uninstallstring);
LaunchAppAndWait(uninstallstring, "",0);
WaitForApplication( LAAW_PROCESS_INFORMATION.hProcess, 0, INFINITE, LAAW_OPTION_WAIT_INCL_CHILD | LAAW_OPTION_WAIT );

It behaved the same way. Its like the wait function is not working properly. It doesn't seem to know that the launched app has finished.

Again this wasn't a problem with IS12. Once I switched to IS2008 this started happening... kinda frustrating
0 Kudos
esiemiat
Level 9

Do you see the uninstall processes actually finish and drop of the task manager, and then have to wait for the LaunchAppAndWait function to return?
0 Kudos
worker-g
Level 5

Thanks for always responding and trying to help.

I do see the spawned setup.exe in the taskmanager.. there are 2 that get spawned. Is that normal? Then when I hit the finish button on from SDFinish (when going through the setup of the app I'm trying to uinstall), it seems like the app doesn't exit for about 20 secs. It stays in the taskmgr for about 20 secs after I hit finish.. then pops off.

Do I have to call something to make sure the app exits right away when I hit hte finish button?
0 Kudos
worker-g
Level 5

by using "WaitForApplication" the delay seems to be only 10 secs (as opposed to about 20).. and only 1 setup.exe spawns (instead of 2 ..I assume because I don't use clone_wait). It seems like it has to wait 10 secs for each setup.exe to kill itself.

If I use WaitForApplication I'm having trouble telling whether the spawned uinstall completed or aborted. I tried LAAW_PARAMETERS.nWaitResult and always get a -1.

Either way this delay is strange.
0 Kudos
esiemiat
Level 9

You are correct, CLONE_WAIT is causing the two setups. My guess is that the delay is caused by the installer cleaning up after itself before it terminates. Removing the CLONE_WAIT should cut this time in half becuase you will only have one process running, but I'm not sure what can be done about the wait in either case.
0 Kudos
worker-g
Level 5

Do you know of way using the "waitforapplication" method to tell if the uninstall was aborted or completed? I tried checking against nWaitResult, but it always gives me a -1.
0 Kudos
MGarrett
Level 6

UninstallApplication (and LaunchApp, LaunchAppAndWait, etc) doesn't know if the uninstall was successful, it just knows whether the uninstall was launched successfully. If the user canceled the uninstall process, you will still get a successful result from UninstallApplication.

Rather than relying on nWaitResult, after the uninstall you can use RegDBGetUninstCmdLine to check if the program is still installed.
0 Kudos