.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

Windows Installer and upgrading

I am trying to figure out how to get the Windows Installer to upgrade an application rather than install a second (newer) instance of it.

I read that the UpgradeCode must remain the same and the ProductCode must change.

I modified the version number in Visual Studio from 1.0.0 to 1.0.1 and VS asked me whether I want to change the ProductCode. I answered yes and it changed the ProductCode.

I confirmed (using Orca) that the UpgradeCode is still the same as in version 1.0.0.

When I build the new installer and run it, it will nevertheless act as if it cannot find the previously installed 1.0.0 version (which is nevertheless listed in add/remove programs) and install a second copy.

What am I doing wrong?
Andrew Brehm Send private email
Tuesday, January 22, 2008
 
 
Either you create a patch file (that can patch the MSI) and install that (no double-click install for msp files) or create an installer that checks for, and removes, earlier versions of your application.

Basically, the installer doesn't inherently "know" if 1.0.1 is _supposed_ to replace 1.0, it just knows it is different.
Jared
Tuesday, January 22, 2008
 
 
Apparently you are doing everything right, I have done that several times and running the new installer uninstalls the previous version and reinstalls the new one on top. I described the process for my reference here:

http://codefornothing.wordpress.com/2007/11/27/short-msi-tutorial/

And there's a detailed Product Code description here:

http://msdn2.microsoft.com/en-us/library/aa367850.aspx

I have always changed the major version though (1.0, 2.0, etc) but I don't know if that is a factor. Are you sure you did not change the application name or any other setting?
JSD Send private email
Wednesday, January 23, 2008
 
 
Jared,

Visual Studio did know that changing the version number requires changing the ProductCode. How does MSI determine that the package is a new version of what is already installed if not by UpgradeCode (same), ProductCode (different), and version number (higher)?

JSD,

"I described the process for my reference here"

Thanks!
Andrew Brehm Send private email
Thursday, January 24, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz