A Reason for ARPSYSTEMCOMPONENT

A Reason for ARPSYSTEMCOMPONENT

  • Comments 4

Last week I blogged about how ARPSYSTEMCOMPONENT is dangerous, but there are reasons for using it. Two reasons ARPSYSTEMCOMPONENT is defined in the product MSIs for the .NET Framework 2.0 and Visual Studio 2005 is to localize the Add/Remove Programs (ARP) entries, and to change certain registry values so that the external UI handler is invoked to handle the requested operation.

Using previous versions of Windows Installer, ARP keys were written simply using the Registry table but weren't used, of course, if ARPSYSTEMCOMPONENT was set to 1. Patch information wasn't written to the registry so patches were responsible for adding entries to the Registry table if so desired. Starting with Windows Installer 3.0, the MsiPatchMetadata table could be added to patch MSPs so that patches could be uninstallable and to provide information to ARP about what patches are applied to a product. The table schema, however, does not allow for localized strings to provide localized ARP entries. If you shipped one MSP per localized product MSI this wouldn't be a problem; but, shipping a single MSP for all localized products — since an MSP is storage for one or more MSTs — or shipping a single MSP for a language-neutral product MSI presents a problem. For this reason ARP entries would have to be written manually using either the Registry table, a custom action (used deferred custom actions since you're modifying machine state), or an external UI handler.

Another reason to set ARPSYSTEMCOMPONENT to 1 for a product is to control what gets invoked when your product is repaired or uninstalled from ARP. If you use an external UI handler to install your product is only makes sense to use that external UI handler to repair or uninstall the product as well. If ARP simply queries Windows Installer for product information, these actions are performed by Windows Installer normally. If you want to have your external UI handler invoked, you must set ARPSYSTEMCOMPONENT to 1 and write your own ARP entries including the UninstallString, which would invoke your external UI handler executable.

There are properties that you can safely set to control some of what gets displayed in the Add/Remove Programs control panel, but once ARPSYSTEMCOMPONENT is set you're responsible for what gets — or doesn't get — displayed.

Leave a Comment
  • Please add 8 and 2 and type the answer here:
  • Post
  • I found a couple of recent posts by Heath Stewart that describe the ARPSYSTEMCOMPONENT property that...
  • How to work around the issues with ARP when defining ARPSYSTEMCOMPONENT=1.
  • How to work around the issues with ARP when defining ARPSYSTEMCOMPONENT=1.
  • How to support N and N-1 with the workaround for defining ARPSYSTEMCOMPONENT=1.
Page 1 of 1 (4 items)