Microsoft KB Archive/278686

= How To Update a Visual Studio Installer Package =

Article ID: 278686

Article Last Modified on 3/29/2007

-

APPLIES TO


 * Microsoft Visual Studio Installer 1.1
 * Microsoft Visual Studio Installer 1.0
 * Microsoft Windows Installer 1.0
 * Microsoft Windows Installer 1.1
 * Microsoft Windows Installer 1.2

-



This article was previously published under Q278686



SUMMARY
This article describes how to correctly create a Visual Studio Installer (VSI) package to perform a small update or minor upgrade.



MORE INFORMATION
There are several codes to be aware of when upgrading a Windows Installer Package:

Package code: The package code is a GUID that associates an .msi file with a particular Microsoft® Windows® Installer package. This code must be changed in each package that you create no matter what kind of upgrade you are performing. This code is not made visible within the VSI interface. To modify this code you must use a tool such as ORCA, which enables you to directly modify the .msi database and change the Package Code property. For additional information on how to obtain and use ORCA, click the article number below to view the article in the Microsoft Knowledge Base:

255905 How To Use the Orca Database Editor to Edit Windows Installer Files

Product code: The Product Code property is a String GUID that uniquely identifies a particular product release. This code only needs to be changed in a major upgrade package.

If any of the rules for upgrading an .msi package are not followed correctly as stated in this article or in the Windows Installer Platform SDK, your package will not upgrade correctly. This may also produce multiple application entries in the Add/Remove Programs (ARP) utility in Control Panel. For additional information on the causes of duplicate ARP entries, click the article number below to view the article in the Microsoft Knowledge Base:

300540 PRB: Multiple Entries in the Add/Remove Programs Utility After a Windows Installer Update

Steps to Create an Update Package in VSI
The following steps will guide you through the process of creating a Visual Studio Installer package, followed by creation of an update/upgrade package.

Original Package

 * 1) Open Visual Studio Installer. Click the New tab and expand the Visual Studio Installer folder. Next, select the Visual Studio Installer Projects folder.
 * 2) Select the &quot;Empty Installer&quot; project.
 * 3) In the Name field, rename your package as MyPackage, and then click Open to start your package.
 * 4) In the Project Explorer panel, right-click the Files folder, click Add, and then click Files. Select a file and add it to your project.
 * 5) From the Build menu, click Build.
 * 6) Save your project (the project file will be saved as MyPackage.wip) and exit Visual Studio Installer.
 * 7) Install the package.

You have now created your original .msi package. Locate the MyPackage.msi package that you have just built and copy it to a new folder on your computer. For example, C:\FirstPackage\MyPackage.msi.

Small Update/Minor Upgrade Package
A small update is an update to one or two files that is too small to warrant changing the product version number. A minor upgrade includes changes large enough to warrant changing the ProductVersion property.

 Open Visual Studio Installer. From the File menu, click Open Project. Locate and open the MyPackage.wip project that you saved previously. In the Project Explorer panel right-click the Files folder, click Add, and then click Files. Select a file (either an updated file or a new file) and add it to your project. This new file must have the same ComponentID as the previous file that you added to the project. To ensure this, go to the Project Explorer window and select the previous file. In the Properties window you will see that the file has a ComponentID. Copy this GUID and replace the other file's ComponentID with this value. (This is to comply with Windows Installer Component rules.) If this is going to be a minor upgrade, you will change the product version number. To change the product version, from the Project menu, click MyPackage Properties. Next, click the Product Information tab and change the product version as needed. The next step is to change the package code. To do so, you must first build and save the package:  Locate the MyPackage.MSI that you have just built and open it by using ORCA (see the beginning of this section for information on ORCA). Find the package code within ORCA by clicking Summary Information from the View menu. Use a tool such as GUIDGEN to change the package code to a different value. GUIDGEN is available for download from MSDN Online at:

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

</li> Save the package.</li></ol> </li> Install the update. For information on performing an update and command line options, see &quot;Patching and Upgrades&quot; in the Windows Installer Platform SDK Help:

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

</li></ol>

You have now created a VSI package and a small upgrade/minor update package.

NOTE: Once you modify the package in ORCA the changes won't be reflected when you edit your package in VSI. This is because ORCA edits the .msi directly, whereas VSI saves changes to a .wip project file and then builds the .msi from that.

<div class="references_section">