Monday, October 03, 2005

Uninstall a Previous Application When Upgrading an Application with Setups Created in VS.NET

Uninstall a Previous Application Installation When Upgrading an Application with Setups Created in VS.NET - The Code Project - .NET

"How to uninstall a previous application install during an upgrade with VS.NET created setups is a question that frequently appears in the forums. No matter what options you select in the VS IDE when you create a new setup for an upgraded application, it still never uninstalls the existing application!

One thing that most developers are not aware of is how to properly use the Update Code, which is what triggers an uninstall of a previous version. Windows Installer includes the capability to find and uninstall previous versions of an application. But there are some steps required that are not well documented in VS.NET to make this happen.

It starts with configuring upgrade codes - GUIDs that the installer engine uses to 'identify' multiple msi packages as being related to each other.However, even when you properly configure the Update Code, the uninstall works - but only for a per-user install. It always fails on a per-machine install.

This article describes how to properly author upgrade setups so that they uninstall properly under typical commonly encountered 'real world' conditions.. ..."


Nice timing...

I was about to release an updated VS2k3 app and was looking for a way to avoid an email with "Uninstall the previous version and then install this..." instructions.

No comments: