Page 1 of 1

Uninstalling previous verison

Posted: Fri Jul 01, 2005 3:14 am
by zchris
I am using the NEEDSUPGRADE variable to uninstall a previous version of my product.

The problem is that if I have the latest version installed and I run an old setup it will have the NEEDSUPGRADE variable set to true ...

How can I prevent installing an old version over a new one?

Thanks!

PS: I'm building my setups with miabuild.exe setup.mpr /r

Posted: Fri Jul 01, 2005 3:29 am
by sinan
If you want to prevent, just pop-up an error or information message, or show a custom dialog, when you detect NEEDSUPGRADE is TRUE in your script...

Posted: Fri Jul 01, 2005 3:44 am
by zchris
The problem is:

- if an old version is installed I want to uninstall the old version and install the new version. (this works ok)

- if a new version is installed and the user runs an old setup I want to prevent him to install over the new version.

NEEDSUPGRADE is true in both cases.

Posted: Fri Jul 01, 2005 5:25 am
by sinan
Gotcha. Then I recommend you write your version info to somewhere in the registry, and compare that whenever NEEDSUPGRADE is true with an internal version information stored in the setup.