Terminal Services Temporary Folder Configuration Is Stored in Multiple Registry Locations

ID: Q243555


The information in this article applies to:
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows 2000 Server

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

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: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

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 /disable 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\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.

Additional query words:

Keywords : kbenv kbnetwork kbtool
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: December 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.