This document explains all the possible ways a client name might be generated for an ICA session based on the three variables: an ICA file, the WFCName.ini file, and whether or not the ICA connection is seamless.
Within an ICA session, an environment variable called CLIENTNAME exists to uniquely identify the ICA client machine. This value is used within auto-created printer names and may be leveraged by other applications for defining other client-specific values or behavior.
Dynamic Client Name versus Machine Name
Dynamic Client Name is a feature that is introduced in Win32 ICA Clients at version 7.00 and later. Prior versions of the Win32 ICA client only reported the client name that was statically configured during install of the client and stored in the wfcname.ini. If the Dynamic Client Name feature is not enabled, the client name that is reported to the MetaFrame XP server when connecting to a session is stored in the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\ClientName
When the Dynamic Client Name feature is enabled, the client name that is used is the same as the current clients machine name.
The ClientName registry value should not be present when the Dynamic Client Name feature is enabled. Dynamic Client Name is initially enabled or disabled during the install process. In the Program Neighborhood Classic client, this can be changed after install by opening Program Neighborhood Classic and setting the Dynamic Client Name check-box under Tools>ICA Settings>General. In all other Win32 ICA Clients including Program Neighborhood Agent, you can enable or disable this feature by deleting or creating the ClientName registry value. These changes should take effect on all new connections.
Note: Earlier releases of the ICA clients (prior to version 6.30) stored the client name in the file C:\wfcname.ini.
Starting with Win32 ICA Client version 6.30.1050:- The Install and Auto Client Update detect the presence of the registry key, if any. If present, Install presents it in the UI, while Auto Client Update respects it, i.e., leaves it unchanged. If not present, both Install and Auto Client Update, migrates the client name into the registry from WFCNAME.INI, if any, or from the machine name.
As designed, the 1050 client uninstall does not remove the registry key, The MetaFrame server uninstall does remove the client registry key along with all Citrix registry keys.
WFCNAME.INI is no longer created. However, if already present, it is not removed from the system, nor is it updated.
The client name is limited to 20 (single-byte) characters or 20 bytes (not including the terminating NULL character).
Unless higher-priority options for setting the client name are used (an .ICA file setting, or a command-line option, all client components that use the client name now read it from and write it to the registry. In case of failure to retrieve the client name, the machine name is used as a last resort.
Client serial numbers, previously also stored in WFCNAME.INI (ClientSN=), are no longer supported. Only when a version of the Citrix ICA Client supplied with the Citrix PC Client Pack was used, a license number, based on the client serial number, had to be entered to access the server.
WFCNAME.INI also used to store client user name (ClientUserName=), and client company name (ClientCompany=), which have both been removed from the InstallShield install and, actually, have never been used by the rest of the client.
The value of the ClientName variable may be drawn from one of three possible locations:
- 1. From the command line.
2. An explicit value set in the [WFClient] section of an ICA file.
3. A value defined in the WFCName.ini file located at the root of the client system drive. For all Win32 ICA Clients version 6.30.1050 and above, wfcname.ini is no longer used. The client name is now kept in the registry, "HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client", key value of typeREG_SZ: "ClientName", and is global for all clients installed on the device that use the registry to retrieve the client name.
CTX101859 PassThrough PNAgent client shows ClientName of Server and not the Originating Workstation
From the 6.20.986 Win32 ICA Client readme:
The autocreated printer option failed when using a pass-through client because the pass-through client routed all users to the same network printer. To enable the pass-through client to use the original client name, add the following registry setting to the computer on which the pass-through client is running.
WARNING! Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Use Registry Editor at your own risk.
A. Run regedt32.
B. Go to
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\PASS THROUGH.
- C. From the Edit pull-down menu, select Add Value and type PASS THROUGH. Select REG_DWORD in the Data Type field.
D. In the DWORD Editor window, type
1 in the Data field to use the original client name for the autocreated printer.
- 4. The workstation (NetBIOS) name of the client machine.
The following list explains when each value is used:
- 1. ICA File takes precedence:
If a ClientName=value entry exists in the [WFClient] section of an ICA file, this value is always used.
2. WFCName.ini is used for Seamless connections:
a) If no ClientName value exists in the ICA file, AND
b) WFCName.ini exists on the root of the system drive, AND
c) the ICA connection occurs in seamless mode, THEN
The value in WFCName.ini is used
- 3. Workstation name is used for non-seamless connections:
a) If no ClientName value exists in the ICA file, AND
b) WFCName.ini exists on the root of the system drive, AND
c) the ICA connection occurs in non-seamless mode, THEN
The value in WFCName.ini is ignored. The workstation name is used instead.
- 4. WFCName.ini is created upon seamless connections:
a) If no ClientName value exists in the ICA file, AND
b) WFCName.ini does not exist the root of the system drive, AND
c) the ICA connection occurs in seamless mode, THEN
The workstation name is used and a WFCName.ini file is created on the root of the system drive.
More Information - When launching a connection in seamless mode, WFICA32.exe checks to see if WFCRUN32.exe is already running. If it is, then it checks to see if any other ICA sessions are already open which might qualify for Session Sharing. If WFCRUN32.exe is not already running when a seamless connection is launched, WFICA32.exe spawns WFCRUN32.exe.
WFCname.ini is read by WFCRUN32.exe, the seamless window manager. WFCName.ini is not read by WFICA32.exe.
By default, ICA files are executed by WFICA32.exe. This association can be changed by editing the client registry value beneath HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WinFrameICA\sh ell\open\command\.
Both WFICA32.exe and WFCRUN32.exe give preference to the ClientName entry in an ICA file whenever present.
If WFCRUN32.exe is spawned but does not locate the WFCNAME.ini file, it creates one with the client name value set equal to the workstation name.
These values are written to appsrv.ini for individual custom connections.
NFuse/Web InterFace generates a ClientName=value line from template.ica based on the current domain name and username. Anonymous logins use a different ICA template file; guest_template.ica.
Modifying "ClientName=[NFuse_ClientName]" to "ClientName= " in the template.ica will return the Hostname of the workstation.
Issue:
After modifying "
ClientName=[NFuse_ClientName]" to "
ClientName= " in guest_template.ica an error message may be displayed.
"ERROR: An internal error occurred."
Workaround:
Modify the guest_template.ica.
Remove the line:
ClientName=[NFuse_ClientName]
Insert the two lines:
BogusClientName=[NFuse_ClientName]
ClientName=
If desired, use anything instead of 'Bogus'.
- Important: The [NFuse_ClientName] tag must appear somewhere in the template file.
CTX376489 Clientnames Should Always Be Unique
CTX102238 XP Professional Workstations report a ClientName of Console
CTX101596 Client Name not Read from ICA File when Session is Embedded in HTML or NFuse Web Page
Source CTX859359 - How the Win32 ICA Client Determines the Value for ClientName