{"id":2983,"date":"2005-08-22T12:16:11","date_gmt":"2005-08-22T12:16:11","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2005\/08\/22\/major-upgrade-patches\/"},"modified":"2005-08-22T12:16:11","modified_gmt":"2005-08-22T12:16:11","slug":"major-upgrade-patches","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/major-upgrade-patches\/","title":{"rendered":"Major Upgrade Patches"},"content":{"rendered":"<p>A <a href=\"http:\/\/blogs.msdn.com\/astebner\/archive\/2005\/06\/05\/425470.aspx#453009\">question<\/a> was asked in <a href=\"http:\/\/blogs.msdn.com\/astebner\/\">Aaron Stebner&#8217;s<\/a> blog about major upgrades via MSP patch files with sequencing information. I would like to take this opportunity &mdash; at Aaron&#8217;s request &mdash; to explain a few guidelines regarding <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/major_upgrades.asp\">major upgrades<\/a> in Windows Installer.<\/p>\n<p>Basically, a major upgrade is an update to a product that changes all of the <code>ProductCode<\/code>, <code>ProductVersion<\/code>, and package code (the latter should always change for any update). A major upgrade &mdash; unlike <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/small_updates.asp\">small<\/a> or <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/minor_upgrades.asp\">minor<\/a> updates &mdash; can be installed either by patching the product or installing a new product MSI. In order to remove the product or certain features of the existing product, you add entries to the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/upgrade_table.asp\">Upgrade table<\/a> with the Remove column empty or set to ALL to remove all features, or a comma-delimited list of feature names to remove only certain features. For the Visual Studio Windows Installer projects when &#8220;RemovePreviousVersions&#8221; is set to &#8220;True&#8221;.<\/p>\n<p>Starting with Windows Installer 3.0, however, things have changed a little. You can now use the more robust <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/eliminating_patches.asp\">supersedence<\/a> feature instead of obsolescence which requires that a patch has information during compile time about all patches that it obsoletes (removes from the patched view of the product). This new feature also allows for proper <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/sequencing_patches.asp\">sequencing<\/a> and supersedence of patches when installing multiple patches in a single installer transaction. Major upgrade patches, however, are eliminated from the list of patches. Major upgrade patches are also not <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/uninstallable_patches.asp\">uninstallable<\/a>, while a major upgrade product is. From the Windows Installer SDK:<\/p>\n<blockquote><p><i>A major upgrade applied by a patch is not uninstallable. Major Upgrades of an application should be performed by installing the upgraded application (.msi file) rather than a patch.<\/i><\/p><\/blockquote>\n<p>This is due in part to the new <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/reducing_patch_size.asp\">product baseline cache<\/a> feature introduced in Windows Installer 3.0. Files are cached for the RTM and any minor upgrades for a product if all small updates include the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msipatchsequence_table.asp\">MsiPatchSequence table<\/a> or at least one minor update includes the MsiPatchSequence table. Small updates can then ship a <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/d_gly.asp?FRAME=true#setup.delta_patch_gly\">delta patch<\/a> that contains the binary differences between the new file and the target baseline to reduce patch size. Because a baseline is cached for a product identified by its ProductCode and a major upgrade changes the ProductCode, the baseline would be invalidated for any patches targeting the major upgrade. To ensure that the old baseline is removed with the upgraded product and a new baseline is created for the new product, ship major upgrades as product MSIs. This also means you can ship a new product that&#8217;s both a standalone installer as well as an upgrade to any existing products.<\/p>\n<p>So, because MSI 3.0-style patches are identified as having an MsiPatchSequence table that cannot be empty and because sequenced major upgrades cannot be installed, patch authoring tools like <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/patchwiz_dll.asp\"><i>PatchWiz.dll<\/i><\/a> will not allow creation of sequenced major upgrade patches. Instead, <i>PatchWiz.dll<\/i> will return via tools like <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msimsp_exe.asp\"><i>msimsp.exe<\/i><\/a> the error code <code>ERROR_PCW_CANT_GENERATE_SEQUENCEINFO_MAJORUPGD<\/code> (defined as 0xC00E5182 in <i>PatchWiz.h<\/i>).<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A question was asked in Aaron Stebner&#8217;s blog about major upgrades via MSP patch files with sequencing information. I would like to take this opportunity &mdash; at Aaron&#8217;s request &mdash; to explain a few guidelines regarding major upgrades in Windows Installer. Basically, a major upgrade is an update to a product that changes all of [&hellip;]<\/p>\n","protected":false},"author":389,"featured_media":3843,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[20],"class_list":["post-2983","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-installation"],"acf":[],"blog_post_summary":"<p>A question was asked in Aaron Stebner&#8217;s blog about major upgrades via MSP patch files with sequencing information. I would like to take this opportunity &mdash; at Aaron&#8217;s request &mdash; to explain a few guidelines regarding major upgrades in Windows Installer. Basically, a major upgrade is an update to a product that changes all of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/2983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/users\/389"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/comments?post=2983"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/2983\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media?parent=2983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=2983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=2983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}