{"id":3043,"date":"2005-08-12T17:33:25","date_gmt":"2005-08-12T17:33:25","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2005\/08\/12\/detecting-repair-patch-install-and-patch-uninstall-for-windows-installer\/"},"modified":"2005-08-12T17:33:25","modified_gmt":"2005-08-12T17:33:25","slug":"detecting-repair-patch-install-and-patch-uninstall-for-windows-installer","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/detecting-repair-patch-install-and-patch-uninstall-for-windows-installer\/","title":{"rendered":"Detecting repair, patch install, and patch uninstall for Windows Installer"},"content":{"rendered":"<p>A frequently asked question is how to detect whether a product installed using <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/windows_installer_start_page.asp\">Windows Installer<\/a> is being repaired, or a patch is being installed or &mdash; <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/removing_patches.asp\">starting<\/a> with Windows Installer 3.0 &mdash; uninstalled. The answer is detecting which properties are set.<\/p>\n<p>When a product &mdash; or even a single feature or multiple features &mdash; is being repaired the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/reinstall.asp\"><code>REINSTALL<\/code><\/a> property is set; however, understand that patching is the act of transforming the view of the original product and re-installing features that contain files to be patched. That means the <code>REINSTALL<\/code> property will also be set during patch install and uninstall scenarios.<\/p>\n<p>When patching a product, the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/patch.asp\"><code>PATCH<\/code><\/a> property is set to a single or &mdash; <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/installing_multiple_patches.asp\">starting<\/a> with Windows Installer 3.0 &mdash; semicolon-delimited list of patches (<em>.msp<\/em> files). If that property is set than you can condition your actions to run during patch installation scenarios. When a patch is being uninstalled you can check if the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msipatchremovallist.asp\"><code>MsiPatchRemovalList<\/code><\/a> property is defined. This contains a semicolon-delimited list of the patch codes being removed.&nbsp;You can also use the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msipatchremove.asp\"><code>MSIPATCHREMOVE<\/code><\/a> property &mdash; a single or semicolon-delimited list of patch codes or patches (<em>.msp<\/em> files), but the <code>MsiPatchRemovalList<\/code> property is recommended.<\/p>\n<p>For more information about conditions in Windows Installer, read <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/using_properties_in_conditional_statements.asp\">Using Properties in Conditional Statements<\/a> in the Windows Installer SDK.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A frequently asked question is how to detect whether a product installed using Windows Installer is being repaired, or a patch is being installed or &mdash; starting with Windows Installer 3.0 &mdash; uninstalled. The answer is detecting which properties are set. When a product &mdash; or even a single feature or multiple features &mdash; is [&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-3043","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-installation"],"acf":[],"blog_post_summary":"<p>A frequently asked question is how to detect whether a product installed using Windows Installer is being repaired, or a patch is being installed or &mdash; starting with Windows Installer 3.0 &mdash; uninstalled. The answer is detecting which properties are set. When a product &mdash; or even a single feature or multiple features &mdash; is [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/3043","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=3043"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/3043\/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=3043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=3043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=3043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}