Got a problem you cannot solve? Try here.
zchris
Posts: 92 Joined: Wed Feb 23, 2005 3:16 am
Location: Austria
Post
by zchris » Fri Jul 01, 2005 3:14 am
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
sinan
Site Admin
Posts: 1037 Joined: Sat Nov 13, 2004 8:12 am
Contact:
Post
by sinan » Fri Jul 01, 2005 3:29 am
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...
zchris
Posts: 92 Joined: Wed Feb 23, 2005 3:16 am
Location: Austria
Post
by zchris » Fri Jul 01, 2005 3:44 am
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.
sinan
Site Admin
Posts: 1037 Joined: Sat Nov 13, 2004 8:12 am
Contact:
Post
by sinan » Fri Jul 01, 2005 5:25 am
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.