I'm working with the code below that my colleague wrote (who has now left the team) and I'm trying to find a more elegant way to wait for the uninstall process to finish. The code below has been generating some errors during upgrades because not enough time is given for the uninstall to complete.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Waiting for uninstall to complete
Started by
finnavear
, Aug 05 2005 15:44
1 reply to this topic
Posted 05 August 2005 - 15:44
CODE |
// If there is a previous version installed uninstall it now. if( g_PerformUninstall = TRUE ) then UseDLL("shell32.dll"); hInstance = ShellExecuteA(NULL, "open", "msiexec.exe", "/qn /x{EE778344-B6AF-4374-90AA-312961EC577E}", SUPPORTDIR, SW_HIDE); UnUseDLL("shell32.dll"); // Wait for a while so that the uninstall can complete before we start installation. Sleep( 1500 ); endif; |
Without guessing and testing for a more reasonable amount of sleep time (my last resort), is there another way to do this?
Posted 09 August 2005 - 14:20
You could try (prototyping and) calling the MsiConfigureProduct API.
Stefan Krüger
InstallSite.org twitter facebook