Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 2.91 KB

tsaware-create-terminal-server-aware-application.md

File metadata and controls

46 lines (29 loc) · 2.91 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: /TSAWARE (Create Terminal Server aware application)
/TSAWARE (Create Terminal Server aware application)
03/02/2022
/tsaware
VC.Project.VCLinkerTool.TerminalServerAware
Terminal Server
/TSAWARE linker option
Terminal Server, Terminal Server-aware applications
-TSAWARE linker option
TSAWARE linker option
fe1c1846-de5b-4839-b562-93fbfe36cd29

/TSAWARE (Create Terminal Server aware application)

/TSAWARE[:NO]

Remarks

The /TSAWARE option sets a flag in the IMAGE_OPTIONAL_HEADER DllCharacteristics field in the program image's optional header. When this flag is set, Terminal Server won't make certain changes to the application.

When an application isn't Terminal Server aware (also known as a legacy application), Terminal Server makes certain modifications to the legacy application to make it work properly in a multiuser environment. For example, Terminal Server creates a virtual Windows folder, such that each user gets a Windows folder instead of getting the system's Windows directory. This virtual folder gives users access to their own INI files. In addition, Terminal Server makes some adjustments to the registry for a legacy application. These modifications slow the loading of the legacy application on Terminal Server.

If an application is Terminal Server aware, it must not rely on INI files or write to the HKEY_CURRENT_USER registry during setup.

If you use /TSAWARE and your application still uses INI files, the files will be shared by all users of the system. If that's acceptable, you can still link your application with /TSAWARE; otherwise you need to use /TSAWARE:NO.

The /TSAWARE option is enabled by default for Windows and console applications. For more information, see /SUBSYSTEM and /VERSION.

/TSAWARE isn't valid for drivers or DLLs.

If an application was linked with /TSAWARE, DUMPBIN /HEADERS will display information to that effect.

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > Linker > System property page.

  3. Modify the Terminal Server property.

To set this linker option programmatically

  • See xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.TerminalServerAware%2A.

See also

MSVC linker reference
MSVC Linker Options
Storing User-Specific Information
Legacy Applications in a Terminal Services Environment