Windows Terminal Server, Remote Desktop Services, Presentation Virtualization, Application Delivery, Remote Application Development and Market Analysis

Most Important Terminal Server Registry Keys and Values

Posted by Benny Tritsch on December 10, 2003 updated on May 31, 2005

[Introduction] [General] [System and User] [Default User] [Folders] [Printers] [Network]

Introduction

The relevant configuration options for terminal servers, terminal server sessions, users, and RDP clients can be found in different places in the registry. Administration tools and Group Policies usually change several registry values. The following chapters of this whitepaper provides you with information on their names, paths and default values.

NOTE: This whitepaper provides a general overview of those registry keys that are essential for Terminal Services. A full documentation of all relevant keys would probably be a book in its own right. However, if you know where to find the interesting locations, there is nothing to prevent you from doing your own experiments on a test system. Experiments have produced many tips for optimizing system performance by modifying the registry, just as described in this book. However, it is clearly neither advisable nor recommended to tweak the registry settings on a production system.

DISCLAIMER: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.

Automatic Application and Script Execution

Windows Server 2003 offers the option to configure applications or scripts in the registry using different keys. These scripts run automatically if a certain event occurs. This mechanism can be used to perform initialization tasks required on terminal servers. The following list presents the corresponding keys in detail

  • HKCU \SOFTWARE \Microsoft \Windows \CurrentVersion \Run: Entered programs are executed upon each user logon.
  • HKCU \SOFTWARE \Microsoft \Windows \CurrentVersion \RunOnce: Entries made by executable programs are deleted after being processed.
  • HKCU \SOFTWARE \Microsoft \Windows NT \CurrentVersion \Windows \Run: Entered programs are executed upon each user logon.
  • HKCU \SOFTWARE \Microsoft \Windows NT \CurrentVersion \Windows \Load: Entered programs are executed upon each user logon.
  • HKLM \SOFTWARE \Policies \Microsoft \System \Scripts: Usually configured through Group Policies.
  • HKU \.DEFAULT \SOFTWARE \Microsoft \Windows \CurrentVersion \Run: Default user is used as a template for new user profiles.
  • HKCU \SOFTWARE \Microsoft \Windows \CurrentVersion \Run: Entered programs are executed upon each user logon.
  • HKLM \SOFTWARE \Microsoft \Windows \CurrentVersion \RunOnce: Entries made by executable programs are deleted after being processed.
  • HKLM \SOFTWARE \Microsoft \Windows \CurrentVersion \RunOnceEx: Entries made by executable programs are deleted after being processed.
  • HKLM \SOFTWARE \Microsoft \Windows NT \CurrentVersion \Terminal Server \Install \Software \Microsoft \Windows \CurrentVersion \Run: Shadow copy.
  • HKLM \SOFTWARE \Microsoft \Windows NT \CurrentVersion \Terminal Server \Install \Software \Microsoft \Windows \CurrentVersion \RunOnce: Shadow copy.
  • HKLM \SOFTWARE \Policies \Microsoft \Windows \System \Scripts \Startup: Usually configured using Group Policies.

If an application or a script is to be run when a user logs off, the following key is used:

  • HKLM \SOFTWARE \Microsoft \Windows NT \CurrentVersion \Winlogon \LogoffApp: Lists applications and scripts, separated by commas.
  • HKLM \SOFTWARE \Microsoft \Windows NT \CurrentVersion \Shutdown \LogoffSetting: Controls what action the system should take when the Log Off command is used (0 - Log off; 1 - Shutdown; 2 - Shutdown and Restart; 3 - Shutdown and Power off)
  • HKLM \SOFTWARE \Microsoft \Windows NT \CurrentVersion \Shutdown \ShutdownSetting: Controls what action the system should take when the Shutdown command is used (0 - Log off; 1 - Shutdown; 2 - Shutdown and Restart; 3 - Shutdown and Power off)

 

Next