Nilzor
Nilzor

Reputation: 18573

Why is my MSI uninstalling after installing?

I've created an MSI with Visual Studio 2010 using the Deployment Project template. It used to work, but now it has started acting up when installing over an earlier version - i.e. upgrading. I have set RemovePreviousVersions to true, but what is actually happening is that it removes "previous" version after installing the new version, effectively removing the new version also. In the MSI log file I see evidence of this. (Feel free to examine it)

Shouldn't normal installation procedure be to 1. uninstall previous version, 2. install new version? Anyone have any explanation of this?

Upvotes: 0

Views: 194

Answers (1)

Hans Passant
Hans Passant

Reputation: 941208

I wasn't sure whether it was a match but you indicated it was. There's a bug in the VS2010 version of the Setup project feature that strikes when you moved the project from VS2008 to VS2010. Quoting from the KB article:

This problem occurs because a different hashing algorithm is used to create the GUIDs in Visual Studio 2010. When you install the MSI file that is created from the Visual Studio 2010 Setup project, the MSI file determines that the GUID has changed and removes the files and registry keys for the installation path based on the sequence of the project.

In this scenario, the files and registry keys for the installation path disappear unexpectedly.

There's a hotfix for it, follow the KB article link for the download and the usage instructions.

Upvotes: 1

Related Questions