[THIN] KB: CTX101644 - Seamless Exception Registry Flags

  • From: "Jim Kenzig Kenzig.com" <jkenzig@xxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Sat, 2 Jul 2005 08:00:54 -0700 (PDT)

CTX101644 - Seamless Exception Registry Flags 

This document was published at: 
http://support.citrix.com/kb/entry.jspa?externalID=CTX101644 


Document ID: CTX101644, Created on: Mar 17, 2003, Updated: Jun 30, 2005 
Products: Citrix MetaFrame XP 1.0 for Microsoft Windows 2000 
 
Symptoms

This document outlines the currently available Server Seamless Engine Exception 
Registry Flags that can be used to control specific behavior of an 
Application's Windows when run in an ICA Seamless Session. There are 2 
sections, Global and per Specified Window. The contents of this document are 
subject to change at any time.

Global Registry Flags

NOTE: These values affect all Seamless connections to a Server and require 
changing the value of only one specific Registry key. If more than one of these 
flags are needed, then add them together as follows.

For example to use Flags 1 and 8 below, the value for SeamlessFlags would be 
0x1 + 0x200 = 0x201. 

Or if you wanted to use Flags 1, 8 and 9 then the value for SeamlessFlags would 
be 0x1+0x200+0x400 = 0x601.

Registry Key: HKLM/System/CurrentControlSet/Control/Citrix/wfshell/TWI

Value Name: SeamlessFlags

Value Type: REG_DWORD

Values: See 1 through 15 Below

1. DISABLE SESSION SHARING 

Value: 0x1

Explanation: Determines if each Seamless connection to the server uses Session 
Sharing. Use this Flag to Disable Session Sharing. Without this Registry Value 
set, or setting this value to 0x0 enables Session Sharing.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3 - MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

2. DISABLE MODALITY CHECK

Value: 0x2 

Explanation: Specifies that the ICA client will not perform a Modality check. 
The owner window of a Modal Dialog can be moved, although input focus will 
remain on the Modal Dialog. This is useful when running an application such as 
PaintShop Pro Ver 6 in a Seamless session. Without this Registry Value set, or 
setting this value to 0x0 specifies that the ICA client will perform a Modality 
check on Seamless windows. 

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3, MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.



3. DISABLE ACTIVE ACCESSIBILITY HOOK

Value: 0x4

Explanation: Determines if the Seamless Engine will load its Active 
Accessibility hook in a Seamless session. By default the Seamless Engine uses a 
technique called event hooking to monitor any changes made to an application?s 
windows on the server and sends these changes to the ICA Client. Wfshell.exe 
loads the DLL, sehook20.dll. Without this Registry Value set, or setting this 
value to 0x0 specifies that Active Accessibility is enabled.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k, 
or Win2k3, MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

4. SUPPORT ZERO SIZED WINDOWS

Value: 0x8

Explanation: Specifies that any applications that create zero-sized windows 
will be reported to the ICA client and will be re-created as zero-sized windows 
on the client. Some applications use zero-sized windows to enforce windows 
modality relationships. Without this Registry Value set, or setting this value 
to 0x0 specifies that zero-sized windows will not be reported or created on the 
client.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3, MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

5. ENABLE COLOR SYNC

Value: 0x10

Explanation: Specifies that the Seamless session will inherit the client system 
color settings. This may cause problems with some applications when the color 
scheme used on the client is not fully supported by the server. Without this 
Registry Value set, or setting this value to 0x0 specifies that the Seamless 
session will not inherit the client system color settings.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3, MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

6. DISABLE SYSTRAY AGENT

Value: 0x20

Explanation: Specifies that the System Tray agent in a Seamless session will 
not be created. The System Tray agent allows an application that uses the 
System Tray, using the Shell_NotifyIcon API, to be sent to the ICA client?s 
System Tray. Without this Registry Value set, or setting this value to 0x0 
specifies that System Tray agent in a Seamless session will be created.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3, MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

7. DISABLE ICONIC WINDOWS

Value: 0x80

Explanation: Specifies that iconic windows will not be sent to the ICA client. 
This may improve performance slightly, however setting it can cause problems 
with applications such as MS Office when run in a Seamless session. For 
example, the application?s icon may not be visible when it is minimized on the 
local Client Taskbar. Without this Registry Value set, or setting this value to 
0x0, specifies that iconic windows are sent to the ICA client.



Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3, MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

8. DISABLE WM_QUERYDRAGICON MESSAGES

Value: 0x200

Explanation: Specifies that the Seamless engine will not send WM_QUERYDRAGICON 
messages to application windows to obtain the Icons associated with them. 
Without this Registry Value set, or setting this value to 0x0, the Seamless 
engine will send these messages to application windows to get the Icons 
associated with them.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3, MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

9. FORCE RAW MOUSE EVENTS TO SERVER

Value: 0x400

Explanation: Specifies that the ICA client will send raw mouse event messages 
to the server. This is useful, when running an application developed using the 
Borland IDE, which allows the creation of dialog boxes that behave like a modal 
dialog box, but its parent window still responds to certain types of window 
messages, like WM_SETFOCUS. Without this Registry Value set, or setting this 
value to 0x0, specifies that the ICA client will send regular translated mouse 
event messages to the server.

Required: ICA Win32 Client version 6.31 or later - MF 1.8 SP4 for TSE - MF 1.8 
SP4 for Win2K - MF XP 1.0 SP3 for Win2k or Win2k3, MF XP 1.0 SP2 for TSE, MPS 
3.0 for Win2k, MPS 3.0 for Win2k3.

10. DISABLE FULL WINDOW DRAG

Value: 0x800

Explanation: Specifies that the Windows feature "Full Window Drag" can be 
disabled. This may be necessary for some non-standard applications. Without 
this Registry Value set, or setting this value to 0x0 specifies this Windows 
feature is enabled.

Required: MF XP 1.0 SP3 for Win2k or Win2k3, MPS 3.0 for Win2k, MPS 3.0 for 
Win2k3.

11. FORCE MENU WINDOW TO HAVE OWNER

Value: 0x1000

Explanation: Specifies that Menu Windows will always be re-created on the ICA 
client with an owner window.

Required: International versions of MF XP SP3 for Win2k or Win2k3, Post MF XP 
SP3 English Hotfix XE103W2K126 for Win2k or later, post MF XP SP3 English 
Hotfix XE103W2K3037 for Win2k3 or later, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

12. DISABLE SHELL HOOK AGENT

Value: 0x2000

Explanation: Instant Messenger type programs commonly use the FlashWindow() API 
to flash the taskbar button to alert users of incoming messages. After applying 
the updates listed below in the 'Required' section, support for the 
FlashWindow() API is added and turned on by default.

Setting the Global Seamless registry value (0x2000) disables this default 
behavior.

Required: Post MF XP SP3 English Hotfix XE103W2K126 for Win2k or later, post MF 
XP SP3 English Hotfix XE103W2K3037 for Win2k3 or later, MPS 3.0 for Win2k, MPS 
3.0 for Win2k3.

13. DISABLE CLIENT INFO SYNC

Value: 0x4000

Explanation: Some custom applications that did not display properly when 
running on Windows XP/2000 with the Windows XP Theme enabled sometimes saw the 
same behavior when running as a seamless application on MetaFrame XP Feature 
Release 3 on Windows 2003 that does not have the Windows XP Theme enabled. For 
example, the title bar of the application is larger in height.

Starting with MetaFrame XP Feature Release 3 for Windows 2000/2003, the server 
seamless engine has extended support for certain window style properties of the 
workstation where the seamless application is running; for example, the styles 
generated by Windows XP Themes.

This new seamless global registry flag, when set, instructs the server-side 
seamless engine not to read certain client workstation window style information.

Set the following server-side registry key to instruct the server seamless 
engine not to synchronize with the client's window style that pertains to those 
representative of the Windows XP Theme:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI

Name: SeamlessFlags
Type: REG_DWORD
Value: 0x4000

Custom applications that do not display properly when running on Windows 
XP/2000 with the Windows XP Theme enabled can be run in a seamless session from 
a workstation that has the Windows XP Theme enabled and be displayed using the 
Windows Classic style.

Required: Post MF XP SP3 English Hotfix XE103W2K126 for Win2k or later, post MF 
XP SP3 English Hotfix XE103W2K3037 for Win2k3 or later, MPS 3.0 for Win2k with 
Hotfix MPSE300W2K006 or later, MPS 3.0 for Win2k3 with Hotfix MPSE300W2K3017 or 
later.

14. Job Object

Explanation: If a published application was a program that created a new 
process and then terminated itself, the published application appeared in the 
Management Console for MetaFrame XP. However, in a seamless session the 
application was launched through session sharing, the application appeared in 
the Management Console but then disappeared.

By default, the thread that checks the process cares about only the first 
instance of the launched process. The thread regarded the published application 
as terminated when the first instance of the process was terminated even if 
that process created a separate process.

This update provides a way to configure those published applications to use the 
JOB object so that additional processes created by the initial process are 
considered as published applications.

For this update to work properly, you need to perform the following steps:

If the command line of the published application is [ApplicationPath], go to 
the following registry key and make changes as necessary:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI\StartInJobObject
Key Value: [ApplicationPath]
Type: DWORD
Value: 0

For example, if the command line specified for the published application is 
c:\notepad.cmd, go to the following registry key and make changes as necessary:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI\StartInJobObject
Key Value: c:\notepad.cmd
Type: DWORD
Value: 0

For those applications whose command line is specified in the StartInJobObject 
key, the published application will not disappear from the Management Console 
until all of the processes created by the process are terminated.

Required: Post MF XP SP3 English Hotfix XE103W2K126 for Win2k or later, post MF 
XP SP3 English Hotfix XE103W2K3037 for Win2k3 or later, MPS 3.0 for Win2k, MPS 
3.0 for Win2k3.

15. Worker Wait Interval

Explanation: This update addresses a custom application's performance when run 
seamlessly. Some applications appeared to be slower to respond when performing 
actions such as moving, resizing, or closing windows. This fix introduces two 
new registry settings that allow administrators to configure an explicit time 
interval for the seamless engine mechanism to monitor when changes take place 
in the seamless applications.

Create the following two registry keys:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI
Key: WorkerWaitInterval
Type: REG_DWORD
Value: <Number of milliseconds allowed> (Values are between 5 ? 500; the 
default is 50.)

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI
Key: WorkerFullCheckInterval
Type: REG_DWORD
Value: <Number of milliseconds allowed> (Values are between 50 ? 5000; the 
default is 500.)

For both values, a larger size slows responsiveness but improves scalability; a 
smaller size increases responsiveness but decreases scalability slightly. The 
level of scalability depends on several factors, such as hardware sizing, types 
of applications, network performance, and number of users.

Required: Post MF XP SP3 English Hotfix XE103W2K126 for Win2k or later, post MF 
XP SP3 English Hotfix XE103W2K3037 for Win2k3 or later, MPS 3.0 for Win2k with 
Hotfix MPSE300W2K006 or later, MPS 3.0 for Win2k3 with Hotfix MPSE300W2K3017 or 
later. 

Registry Flags Per Specified Window

These Flags are used to single out a specific Window of an Application that may 
need to be handled differently by the Seamless Engine. To determine the Class 
Name of a Window, use SPY ++ from Microsoft Visual Studio or a Third Party 
Tool. 

Specifying a Seamless exception flag for a specific application window consists 
of creating a registry key that is the same name as the Window Class Name and 
adding 2 Value Names, Type and ClassName, each with their own value.

Registry Key: 
HKLM/System/CurrentControlSet/Control/Citrix/wfshell/TWI/<WindowClassName>

Value Name1: ClassName

Value Type1: REG_SZ

Value1: <WindowClassName>

Value Name1: Type

Value Type2: REG_DWORD

Value2: See 1 through 7 Below

Steps to Add Per Specified Window Exception Flags:

a) Run Regedit

b) Go to HKLM/System/CurrentControlSet/Control/Citrix/wfshell/TWI

c) Highlight the TWI Key, then from the Edit Menu select New, then Key.

d) Enter, <WindowClassName> for the Key Name.

e) Highlight the newly created <WindowClassName> Subkey.


f) From the Edit Menu, select New, then String Value.

g) Enter, ClassName for the Value Name.

h) Double-click on the Value Name, Enter the <WindowClassName> for the Value 
data.

i) Highlight the <WindowClassName> in the left pane.

j) From the Edit Menu select New, then DWORD value.

k) Enter, Type for the Value Name.

l) Double-click on the Value Name, Enter the < Hex number for the Exception 
Flag > for the Value data.

Adding Multiple Window Class Names under one Registry Setting 

See Citrix KB Article, Seamless: Adding Multiple Window Class Names under one 
Registry Setting


Creating a .Reg File

If a registry Flag needs to be created on many Servers, then it might be 
worthwhile to create it first on one server, then export the registry key as a 
.Reg file which can then be easily executed on the other servers. To export a 
.Reg file, Select Export from the Regedit File menu.

Specifying more than one Exception Flag for a window.

If more than one of these flags are needed for a specific window, then add them 
together as follows.

For example to use Flags 1 and 2 below, add 0x8 + 0x10 = 0x18

1. WINDOW ALWAYS VISIBLE

Value: 0x8

Explanation: For performance reasons, invisible windows that are created are 
not re-created on the ICA client. Setting this flag for a specified window 
enables it to be re-created on the ICA client.



Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3 - MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

2. WINDOW SIZE AND LOCATION NOT CHECKED

Value: 0x10

Explanation: For performance reasons, windows that are created with a Zero 
window size or created outside of the Desktop area, are not re-created on the 
ICA client. Setting this flag for such a specified window enables it to be 
re-created on the ICA client.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3 - MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

3. USE OWNER WINDOW INSTEAD OF PARENT

Value: 0x20

Explanation: Enabling this flag specifies that the Owner window of the window 
specified will be determined by using the GW_OWNER parameter instead of the 
GWL_HWNDPARENT parameter. This may be necessary if some application windows do 
not use the same window as both the Parent and Owner window.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3- MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

4. USE GETPARENT API

Value: 0x40

Explanation: Setting this value to a window enables the Seamless engine to use 
the GetParent API to get the Owner of the specified window.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3 - MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

5. SET AS INDEPENDENT WINDOW

Value: 0x80

Explanation: Setting this value to a window enables the Seamless engine to send 
the specified window as an independent window (no parent, no owner).

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3 - MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

6. SEND NO ICON CHANGES

Value: 0x100

Explanation: Setting this value to a window enables the Seamless engine not to 
send WM_GETICON or WM_QUERYDRAGICON messages to the specified window. This may 
cause some applications to have a generic Icon displayed on the Local ICA 
client Taskbar instead of its own.

Required: MF 1.8 SP4 for TSE - MF 1.8 SP4 for Win2K - MF XP 1.0 SP3 for Win2k 
or Win2k3 - MF XP 1.0 SP2 for TSE, MPS 3.0 for Win2k, MPS 3.0 for Win2k3.

7. DO NOT REQUEST SMALL ICON

Value: 0x200

Explanation: Setting this value to a window, will direct the Server Seamless 
Engine to not request the small Icon associated with that window. This may be 
needed for application windows that alternate between different Icons while 
running that are not displaying the different Icons when run Seamlessly.

Required: Post MF XP SP3 English Hotfix XE103W2K126 for Win2k or later, post MF 
XP SP3 English Hotfix XE103W2K3037 for Win2k3 or later, MPS 3.0 for Win2k, MPS 
3.0 for Win2k3.

Adding Global Seamless Exception Flags Graphic



Adding Specific Window Seamless Exception Flags Graphic.




Other related posts: