Share via


Using Custom Actions on a Terminal Server

This section describes the use of DLL, EXE, and Script custom actions only when all of the following conditions are true:

  • The installer package is being installed on Windows 2000 or later.
  • The package is installed on a system hosting Terminal Services. In this case, the installer sets the TerminalServer property.
  • The package is installed as a per-machine installation.

If all of the preceding conditions apply, custom actions run in an environment similar to that which exists when an application is installed with no user logged-in. In this case, the following are true:

  • Deferred custom actions run in the context of the local system unless the action has the msidbCustomActionTypeTSAware attribute. This is true even if the custom action would normally impersonate the user on a system that was not a Terminal Server. Note that if a custom action having the msidbCustomActionTypeTSAware attribute changes the user's registry, the installer does not automatically ensure that those changes are also made in the registry of every user on the machine. This is because most users on Terminal Server machines are prohibited from installation operations such as the repair of missing per-user data. It is up to the author of the package to ensure that installation correctly handles cases where some resources may not exist for some users. In this case, the author needs to evaluate whether it is appropriate to use msidbCustomActionTypeTSAware given the operations performed by the custom action.
  • Any registry operations in a deferred custom action that read from the HKCU registry hive sees the system's default registry hive and not the current user's registry hive.
  • Any registry operations in a deferred custom action that write to HKCU\Software are detected by the installer and copied to every user of the computer at the next logon of the user.
  • Any registry operations in a deferred custom action that write to HKCU, but are not under the HKCU\Software registry key, are not detected by the installer or copied.

Send comments about this topic to Microsoft

Build date: 1/8/2009