Hello,
how could I check if the previuos version of my software exist? If there is no previous version the user should be informed by a dialog and then the application should finish. Is there an example for my setup?
Thanks for your help
Thomas
Update->Check if previous version exists
Update->Check if previous version exists
Regrads,
Dalli
Dalli
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
If your previous version was made with IA, IA automatically detects if there is a previous version installed and returns the result in NEEDSUPGRADE variable. Take a look at the Basic Setup template, which already includes code that detects and removes previous versions. If your previous version is not an IA installer, then:
You can use the "Is MSI Setup Installed" plug-in, if it returns FALSE, you can add a messagebox and a Terminate Installation commands. The script would look like this:
Where $TESTCODE$ would be the product code of application.
You can use the "Is MSI Setup Installed" plug-in, if it returns FALSE, you can add a messagebox and a Terminate Installation commands. The script would look like this:
Code: Select all
Get Installed State for $TESTCODE$ into Variable ISInstalled
if Variable ISInstalled Equals FALSE
MessageBox: Application Not Install, Application X is not installed
Terminate Installation
end
Where $TESTCODE$ would be the product code of application.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Hi,
I was just checking out this and, from what I can discover, this does not work
I create a version 1.0 of a setup and install it. I then create a version 1.0.1 (same Product code) and install that (I've got it set up to do an upgrade and it works just fine).
Now, if I run the 1.0 setup again, then NEEDSUPGRADE is set to TRUE, even though this is an older version of the product! Is that correct, or is it a bug? If it's correct, how can I solve my problem? I need to work out it's an oler version and not install.
Thanks,
Andy.
I was just checking out this and, from what I can discover, this does not work
I create a version 1.0 of a setup and install it. I then create a version 1.0.1 (same Product code) and install that (I've got it set up to do an upgrade and it works just fine).
Now, if I run the 1.0 setup again, then NEEDSUPGRADE is set to TRUE, even though this is an older version of the product! Is that correct, or is it a bug? If it's correct, how can I solve my problem? I need to work out it's an oler version and not install.
Thanks,
Andy.
Andy,
This is the correct behavior. It allows you to "downgrade" to an older version of the software.
The way I do this is to add an MSICode script to the "Check Application Prerequisites" region. This script checks the version of the installed application EXE using "Get File Version" (I use Parse String to split the build number from the rest of the version string) and then terminates the installation if necessary.
Good luck,
-Scott
andyhore wrote:Now, if I run the 1.0 setup again, then NEEDSUPGRADE is set to TRUE, even though this is an older version of the product! Is that correct, or is it a bug? If it's correct, how can I solve my problem? I need to work out it's an oler version and not install.
This is the correct behavior. It allows you to "downgrade" to an older version of the software.
The way I do this is to add an MSICode script to the "Check Application Prerequisites" region. This script checks the version of the installed application EXE using "Get File Version" (I use Parse String to split the build number from the rest of the version string) and then terminates the installation if necessary.
Good luck,
-Scott
Who is online
Users browsing this forum: Google [Bot] and 34 guests