{"id":3053,"date":"2005-08-05T13:26:35","date_gmt":"2005-08-05T13:26:35","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2005\/08\/05\/the-dangers-of-arpsystemcomponent\/"},"modified":"2005-08-05T13:26:35","modified_gmt":"2005-08-05T13:26:35","slug":"the-dangers-of-arpsystemcomponent","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/the-dangers-of-arpsystemcomponent\/","title":{"rendered":"The Dangers of ARPSYSTEMCOMPONENT"},"content":{"rendered":"<p>Back in March I <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2005\/03\/06\/386096.aspx\">wrote<\/a> about the dangers of using the <code>RunOnce<\/code> and <code>Run<\/code> registry keys. This is another post to help you avoid some other pitfalls.<\/p>\n<p>The <code><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/arpsystemcomponent.asp\">ARPSYSTEMCOMPONENT<\/a><\/code> property in Windows Installer does not actually do anything directly to your installation &mdash; Windows Installer doesn&#8217;t even check for it. What does happen, however, is that the Add\/Remove Programs (ARP) control panel applet normally queries Windows Installer for application and patch information. When <code>ARPSYSTEMCOMPONENT<\/code> is defined for a package, all the data is read from the registry key under <code>HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionUninstall<\/code>.<\/p>\n<p>When <code>ARPSYSTEMCOMPONENT<\/code> is defined the installation package and patches are responsible for <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/shellcc\/platform\/shell\/programmersguide\/shell_adv\/setprogramaccess.asp\">writing<\/a> their own ARP registry keys and values. That&#8217;s easy enough to do using the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/registry_table.asp\">Registry table<\/a> or a custom action. But what happens when a patch &mdash; perhaps a service pack, or <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/minor_upgrades.asp\">minor upgrade<\/a> &mdash; is installed?<\/p>\n<p>If <code>ARPSYSTEMCOMPONENT<\/code> is defined and set to 1, then when the patch is obsoleted, superseded, or uninstalled (starting with MSI 3.0) the patch is removed from the view created by starting with the product and layering the applicable transforms provided by the patches. If the patch is removed from the view, then all information about those ARP keys are lost. The ARP keys have now been orphaned. If <code>ARPSYSTEMCOMPONENT<\/code> was not defined then Windows Installer wouldn&#8217;t have reported the obsoleted, superseded, or uninstalled patch to ARP and the ARP entry wouldn&#8217;t have been displayed.<\/p>\n<p>Be careful when deciding to write your own ARP entries by defining <code>ARPSYSTEMCOMPONENT<\/code>. You can still set properties like <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/arpproducticon.asp\"><code>ARPPRODUCTICON<\/code><\/a> to display in ARP, but having ARP read everything including your <code>UninstallString<\/code>, <code>DisplayName<\/code>, and other registry values means that you&#8217;re responsible for adding and removing those values, the latter of which is difficult when your patch that defined then, for example, is removed from the view.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in March I wrote about the dangers of using the RunOnce and Run registry keys. This is another post to help you avoid some other pitfalls. The ARPSYSTEMCOMPONENT property in Windows Installer does not actually do anything directly to your installation &mdash; Windows Installer doesn&#8217;t even check for it. What does happen, however, 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":[5,20],"class_list":["post-3053","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-arpsystemcomponent","tag-installation"],"acf":[],"blog_post_summary":"<p>Back in March I wrote about the dangers of using the RunOnce and Run registry keys. This is another post to help you avoid some other pitfalls. The ARPSYSTEMCOMPONENT property in Windows Installer does not actually do anything directly to your installation &mdash; Windows Installer doesn&#8217;t even check for it. What does happen, however, is [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/3053","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=3053"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/3053\/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=3053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=3053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=3053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}