Share via


Component Guidelines for Terminal Server

The following guidelines are recommended when developing components for Windows Installer installations that may be run on a terminal server:

  • Use profile folders with values that depend on the ALLUSERS property. Do not install resources into profile folders that are always per-user, even if the installation is per-machine. Not all users will receive copies of the resources.
  • Do not install any per-user registry information at setup time. Instead, generate the registry information when the application is first run. Alternatively, use default values and only write per-user registry information when it differs from the default value.
  • If you must write per-user information to the registry during setup, separate the per-user and per-machine data into different installer components. Author the package such that the installer does not verify and attempt to repair the per-user components when the application is activated. Many terminal servers are configured such that users cannot repair applications. Your application should handle the case of missing registry keys gracefully.
  • Write all HKCU registry information under the HKCU\Software hive.
  • Storing configuration information in INI files is not recommended.
  • If a package used for only per-machine installations should write environment variables to the computer's environment by including * in the Name column of the Environment Table. If the package can be used for per-user installations or per-machine installations, create two components: (1) a per-user component with the Environment table entries authored for user settings, and (2) a per-machine component with the Environment table authored for computer settings. Create a condition for the installation of this component using the ALLUSERS property. When performing per-machine installations from a terminal server, the installer writes per-user environment variables to HKU\.Default\Environment. Because Terminal Services does not replicate this section of the registry, the installation does not set the per-user environment variables.
  • Do not save user information, such as the user name or the path to user files, in the HKCU registry hive or INI files. The Terminal Services system copies this information make them the default for all future users.

Send comments about this topic to Microsoft

Build date: 1/8/2009