Archive: Uninstall Wizard Cancel Button


Uninstall Wizard Cancel Button
Hi

At present our installer has the ability to uninstall a previously installed version. The process is as follows:

Current state = application already installed.

(1) User double-clicks our exe.
(2) Dialog appears saying application is already installed, and then says please wait whilst the application is being uninstalled, user presses [OK]
(3) Uninstall wizard appears.

From here there is 2 different routes "next" and "cancel"

[next]
Application uninstalls and then installs. Everythings good.

[Cancel]
The uninstaller cancels but then the installer wizard appears and providing the user clicks [next] we install over whats already there leaving the application in a funny state.

Is there a way around this problem?

Cheers

Paul


The best way is probably just to add a check just after the uninstall is called to make sure it actually uninstalled the application. If not, display a message to the user and quit. (Use ExecWait to make sure it waits for the uninstall to complete before doing the check.)

Your uninstall check could be something like checking for the presence of an old EXE, verifying a registry key, etc.

This would have the added benefit of stopping the installation if some other glitch happened that prevented the application from properly uninstalling.


Thanks, that worked a dream.