imageSome applications use the computer’s name as a unique identifier, rather than using the user name. In a single-user-per-computer environment, this strategy works well.

However, in a Multi User environment such as Citrix XenApp or Microsoft’s Remote Desktop Services (Terminal Server), all connected users report the same computername.

If the application relies on unique computernames to handle tasks such as file and record locking, then the application will fail.

imageWe can however set an Application Compatibility Flag in the registry to return the username instead of the computername.

To demonstrate this behaviour I wrote a small Test Application called TestAppCompatFlags.exe.

Without the compatibility flags the application will return the Computername and Username when pressing the buttons:


When you press the Set Compatibility Flag button the following registry key will be created:

In this key a DWORD value Flags will be set to 18 HEX.

You need to restart the test application to test the new behaviour:

image (719)