PDA

View Full Version : TERMINAL_SERVER_AWARE compile switch



Allan Greis Eriksen
07-10-2013, 02:45 AM
The #pragma directive has a TERMINAL_SERVER_AWARE switch. What does that do? The help file just states this:

TERMINAL_SERVER_AWARE—Set Value to 1 to compile terminal server-aware installations.

But what can I expect from the installation file when it is set to true?

The reason for this is that I am trying to build automatic updates on a terminal server from a user terminal session.

linder
07-10-2013, 03:22 AM
Allan,


But what can I expect from the installation file when it is set to true?

What you would expect from any other Windows application with the "terminal server aware" flag set in the IMAGE_OPTIONAL_HEADER DllCharacteristics field in the program image's optional header. When this flag is set, Terminal Server will not make certain changes to the (SetupBuilder) application.

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

Only you (the developer of the specific application) can decide whether to set this flag or not. It completely depends on the application type.

Friedrich

Allan Greis Eriksen
07-10-2013, 04:43 AM
You learn something new every day :)

Thanks for explaining this flag. I have had some issues in the past deploying on the terminal servers in the past and I have coded different solutions to accommodate them including the ones that you describe. I did not know of this flag. I'll checkout the msdn for deeper info on this.