Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > How do you get an msi installer to check for a minimum version number of your already installed application
 

How do you get an msi installer to check for a minimum version number of your already installed application

How do you get an msi installer to check for a minimum version number of your already installed application?

We are distributing a full install of our updated Vista ready application (version 4.00.0)
Some of our users already have an earlier version of our application installed and others do not. The new install will work fine as long as the user is a new user or on a version that was released during the last year. However, if they are using an old version of the application it will not install correctly and could result in loss of data.

I would like to limit the installer to run only if no previous install is found or if the version number is 3.60.0 or greater.

(Our program is written in visual basic using Visual Studio 2005 and .NET framework 2.0. The Msi installer version is 3.1)

MH Smith  Thursday, July 19, 2007 6:44 PM

You can add a row to the Upgrade table with the Check only option to detect the old version (you can specify a maximum version). Then you add a custom action type 19 which will display an error message and exit the setup. On this custom action add a condition that uses the property oyu specified in the Upgrade table.

To do this you would have to post-process your msi file, or use a different authoring tool, because Visual Studio doesn't expose the Upgrade table.

Stefan Krueger  Friday, July 20, 2007 11:10 AM

If the old application is a different project, uninstall it.

If you're using click once deployment and not a setup project, you can set the projec to check for updates from a fixed location which will check the major.minor.build.revision

If there's a change, it will prompt the application user to upgrade.

Adamus

Adamus Turner  Thursday, July 19, 2007 6:50 PM

You can add a row to the Upgrade table with the Check only option to detect the old version (you can specify a maximum version). Then you add a custom action type 19 which will display an error message and exit the setup. On this custom action add a condition that uses the property oyu specified in the Upgrade table.

To do this you would have to post-process your msi file, or use a different authoring tool, because Visual Studio doesn't expose the Upgrade table.

Stefan Krueger  Friday, July 20, 2007 11:10 AM

You can use google to search for other answers

Custom Search

More Threads

• ClickOnce DotNet installation packages on Apache with .Net 3.5
• ClickOnce just reboots PC with no warning, why?
• Setup of different MSMs containing same files in one setup fails
• Install from CD
• A couple of Setup newbie questions
• How to add to an application new previus requirements?
• Passing arguments to DOTNET's href'ed Executables
• Without .net framework
• Problem in deploying the vb.net application.
• Can't find configuration file are running setup produced by setup project in VS 2008