Microsoft KB Archive/243555

From BetaArchive Wiki
Knowledge Base


Terminal Services Temporary Folder Configuration Is Stored in Multiple Registry Locations

Article ID: 243555

Article Last Modified on 3/2/2007



APPLIES TO

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server



This article was previously published under Q243555

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry


SUMMARY

A Windows 2000-based computer running Terminal Services creates, by default, a temporary folder under the %TEMP% folder for each client session. The name of this temporary folder is based on the hexadecimal representation of the session ID. Also, the creation of this temporary folder can be controlled by using either of the following methods:

  • Flattemp.exe Tool
  • Terminal Services Configuration Tool

This article discusses how to change temporary folder configuration, and also provides additional information about registry locations that store the temporary folder configuration information.

MORE INFORMATION

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To modify temporary folder configuration, use either of the following methods:

NOTE: To use per user temporary folders, you need to verify that both tools described in this article are configured to have this setting disabled. If either of these tools is configured to have this setting enabled, per user temporary folders do not work.

Method 1

Use the Flattemp.exe tool to enable or disable flat temporary folders, or to query configuration settings. The syntax for the Flattemp.exe tool is:

flattemp /enable - Enable flat temporary folders.
flattemp /disable - Disable flat temporary folders.
flattemp /query - Query current setting.

NOTE: The default setting is disable.

For example, an administrator may disable per session temporary folders by typing "flattemp /enable" (without the quotation marks) at a command prompt and then pressing ENTER. This results in all clients sharing the same %TEMP% folder.

Method 2

Use the Terminal Services configuration tool:

  1. Start the Terminal Services Configuration MMC snap-in.
  2. Click the Server Settings folder, and then double-click Use temporary folders per session.
  3. In the Use temporary folder per session dialog box, click the appropriate configuration option.

NOTE: The default setting is Yes.

Temporary folder settings are located in the following registry key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server


Terminal Services configuration tool settings are:

Value: PerSessionTempDir
Type: REG_DWORD
Data value: 0x1 (enabled, the default setting)

Flattemp.exe tool configuration settings are:

Value: FlatTempDir
Type: REG_SZ
Data value: 1 (enabled, the default setting)

NOTE: This registry value only exists if flat temporary folders are enabled. If it is disabled, the FlatTempDir value is not present.


Keywords: kbenv kbinfo kbnetwork KB243555