{"id":2843,"date":"2005-09-22T11:48:00","date_gmt":"2005-09-22T11:48:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2005\/09\/22\/controlling-how-msipatchsequence-is-generated\/"},"modified":"2005-09-22T11:48:00","modified_gmt":"2005-09-22T11:48:00","slug":"controlling-how-msipatchsequence-is-generated","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/controlling-how-msipatchsequence-is-generated\/","title":{"rendered":"Controlling how MsiPatchSequence is Generated"},"content":{"rendered":"<p>When running on <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/what_s_new_in_windows_installer_version_3_0.asp\">Windows Installer 3.0<\/a> and newer, the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msipatchsequence_table.asp\">MsiPatchSequence table<\/a> dictates <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2005\/09\/12\/464047.aspx\">how patches apply<\/a> to a target product install. When using <em><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/patchwiz_dll.asp\">PatchWiz.dll<\/a><\/em>, you can allow this table to be automatically generated, fill it with data yourself, or even prevent it from being generated if you want <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/what_s_new_in_windows_installer_version_2_0.asp\">Windows Installer 2.0<\/a> behavior. This means that applicable patches will only be applied in the order specified, among other things.<\/p>\n<p><em>PatchWiz.dll<\/em> is used to automatically generate transforms between 1 or more sets of target and upgrade <em>.msi<\/em> files, store them in an <em>.msp<\/em> file, and compress all the changed files in a <em>.cab<\/em> file that is streamed into the <em>.msp<\/em> file. To do this it uses a <em>.pcp<\/em> file that is &mdash; like <em>.msi<\/em>, <em>.msm<\/em>, and <em>.msp<\/em> files &mdash; a structured storage file that contains a set of tables. One of these optional tables is the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/patchsequence_table__patchwiz_dll_.asp\">PatchSequence table<\/a>.<\/p>\n<p>If the PatchSequence is provided in the <em>.pcp<\/em> file you must fill it with data according to the schema defined in the table documentation, as well as in the <em>template.pcp<\/em> in the <em>SamplesSysMgmtMsiPatching<\/em> directory in the <a href=\"http:\/\/msdn.microsoft.com\/platformsdk\">Platform SDK<\/a> (if the Windows Installer SDK feature is installed). This table is similar in nature to the <em>schema.msi<\/em> file in the <em>SamplesSysMgmtMsidatabase<\/em> directory. If you do not fill it with data, an empty MsiPatchSequence table is created by <em>PatchWiz.dll<\/em> 3.0 or newer in the <em>.msp<\/em> file. When you attempt to apply that patch, you will see the following error.<\/p>\n<p>MSI (c) (58:14) [16:43:17:498]: Note: 1: <font color=\"#ff0000\">2262<\/font> 2: MsiPatchSequence 3: <font color=\"#ff0000\">-2147287038<\/font><br \/>MSI (c) (58:14) [16:43:17:498]: PATCH SEQUENCE ERROR: X:Patch.msp patch is missing sequencing info!<\/p>\n<p><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/windows_installer_error_messages.asp\">Windows Installer error<\/a> 2262 reads, &#8220;Stream does not exist: [2]. System error: [3].&#8221; Assign the number fields and the error reads, &#8220;Stream does not exist: MsiPatchSequence. System error: -2147287038.&#8221; -2147287038 converted to hexadecimal is 0x80030002, which is <code>STG_E_FILENOTFOUND<\/code>.<\/p>\n<p>You can also allow <em>PatchWiz.dll<\/em> 3.0 or newer to create the MsiPatchSequence table automatically and fill the table with a single product family. Simply leave the table out of your <em>.pcp<\/em> file. For more information about how the patch family and sequence number are generated, read <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/generating_patch_sequence_information___patchwiz_dll_.asp\">Generating Patch Sequence Information<\/a> in the Windows Installer SDK.<\/p>\n<p>If you don&#8217;t want to take advantage of <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/sequencing_patches.asp\">patch sequencing<\/a>, the MsiPatchSequence table must not be defined in your resultant <em>.msp<\/em> file. To dictate that <em>PatchWiz.dll<\/em> 3.0 or newer should not create the table and since an empty PatchSequence table in your <em>.pcp<\/em> file will ultimately result in error when attempting to apply the patch, you need to define the <code>SEQUENCE_DATA_GENERATION_DISABLED<\/code> property in the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/properties_table_patchwiz_dll_.asp\">Properties table<\/a> in your <em>.pcp<\/em> file with a value of 1.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When running on Windows Installer 3.0 and newer, the MsiPatchSequence table dictates how patches apply to a target product install. When using PatchWiz.dll, you can allow this table to be automatically generated, fill it with data yourself, or even prevent it from being generated if you want Windows Installer 2.0 behavior. This means that applicable [&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-2843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-installation"],"acf":[],"blog_post_summary":"<p>When running on Windows Installer 3.0 and newer, the MsiPatchSequence table dictates how patches apply to a target product install. When using PatchWiz.dll, you can allow this table to be automatically generated, fill it with data yourself, or even prevent it from being generated if you want Windows Installer 2.0 behavior. This means that applicable [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/2843","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=2843"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/2843\/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=2843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=2843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=2843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}