Rate this Article:
You must be signed in to rate again
Article Feedback Print View
Alternate Languages:

Changes to Printer Properties in the ICA 9.200 Client with Hotfixes PSE400R01W2K3033 and PSE400R01W2K037 and Later

Document ID: CTX108763   /   Created On: May 19, 2006   /   Updated On: Mar 28, 2007
Average Rating: 3

Summary

This is a description of the changes made to printer properties inheritance and retention with the ICA 9.200 Client and Presentation Server 4.0 hotfixes PSE400R01W2K3033 and PSE400R01W2K037 and later.

Note: Hotfixes PSE400R01W2K3033 and PSE400R01W2K037 have been superseded by more recent hotfixes and are no longer available.  Refer to the following links for information on the most recent hotfixes.

Background

Definition of printer properties:

  • The metadata used to construct the printer including name, port, driver, print processor, comment, location, and printer attributes. These correspond to the fields of the Windows PRINTER_INFO_2 data structure. The following link from MSDN describes this structure:
  • User printing preferences (default document settings) such as orientation, resolution, and media-type. These items are represented by the Windows DEVMODE data structure. Some of these settings are common for all printers, but much of this data is driver-specific. The following link from MSDN describes this structure:
  • Printer device settings (printer driver data) such as tray-form table or the data representing the state of configured options. Such values are normally found in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\<PrinterName>\PrinterDriverData key for each printer in the Windows system registry. The actual names and interpretation of these values are always driver specific.

How Presentation Server 4.0 and the ICA 9.200 Client Controls the Inheritance of Device Specific Printer Properties

Because some printer properties are device dependent, it cannot be assumed that all data from the client’s printer can be copied to the autocreated printer on the server. There needs to be an equivalency test.

Note: Altering the default printer properties retention behavior of Presentation Server 4.0 to “Retained in user profile,” only stores printer properties in the user profile on the server and prevents any properties exchange with the client. In this case the customized equivalency test has no influence and will be ignored. The equivalency test will still be used when determining when to restore settings which have been saved to the server-side profile from a previous session.

Before the ICA 9.200 Client and Presentation Server 4.0 hotfixes PSE400R01W2K3033 and PSE400R01W2K037, a checksum, based off of the entire DRIVER_INFO_6 structure of a print driver was used to determine equivalency. This structure is documented by Microsoft at the below link:

Microsoft DRIVER_INFO_6 Structure Documentation

If the checksum was the same, meaning each piece of information was exactly the same, between the driver on the client and server, all of the printer settings from the client printer would be copied to the client autocreated printer on the server.

The pieces of data now used by default from DRIVER_INFO_6 after this fix include:

  • pName - The name of the driver
  • cVersion – The version of the driver, either 3 for user-mode drivers designed for Windows 2000/2003/XP or 2 for kernel mode drivers designed for Windows NT.
    This correlates to the following registry value:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3 or Version-2\DriverName\Version
  • pEnvironment – This specifies to the environment the driver was written for and correlates to the location of the driver in a sub-key under:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments
  • pDriverPath – This points to the location of the driver file. The file it looks for is specified in the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\DriverName
  • dwlDriverVersion – This is the version number of the print driver as reported by the driver. This correlates to the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\PrinterName\DriverVersion
  • ftDriverDate – The date of the driver package as reported by the driver. This correlates to the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\PrinterName\DriverDate

A piece of the PRINTER_INFO_2 structure is also used:

  • pDevmode – This is a collection of information of printer settings in another structure known as DEVMODE. This structure is described here:
    • dmDriverExtra – This is the size of printer settings unique to a particular driver. This can vary widely among different drivers.

Customizing the Equivalency Test

Before the ICA 9.200 Client and Presentation Server 4.0 hotfixes PSE400R01W2K3033 and PSE400R01W2K037, if any member of the DRIVER_INFO_6 structure was different between the client and server, only device-independent data would be shared between the client and server. This would prevent device specific data from being inherited by a client printer on the Presentation Sever.

The above hotfixes and client now allow the administrator to determine which of the above seven fields are used for determining a driver match if the default equivalency test is not desired.

The administrator needs to define which fields to use in the server’s wtsuprn.inf file located in “C:\program files\citrix\System32.”

To configure matching, follow these instructions:

  1. Open the C:\program files\citrix\System32\wtsuprn.txt file.
  2. Save this file as Wtsuprn.inf.
  3. Add a section to this file:
    [DriverEquivalenceFields]
  1. Add an entry for a driver, for example:
    “HP LaserJet 4”
    Note: Include the quotation marks.
  1. Choose which of the seven criteria you want to match by, for example if you wanted to match by all seven fields for the HP LaserJet 4 the entry would look like:
    [DriverEquivalenceFields]
    “HP LaserJet 4” = Name,DevModeSize,WinVer,Env,DriverFile,Version,Date

Here is a key that shows which structure and member each value in the wtsuprn.inf correlates to:

  • Name = pName member of DRIVER_INFO_6
  • DevModeSize = dmDriverExtra from DEVMODE structure
  • WinVer = cVersion member of DRIVER_INFO_6
  • Env = pEnviroment member of DRIVER_INFO_6
  • DriverFile = pDriverPath of DRIVER_INFO_6
  • Version = dwlDriverVersion of DRIVER_INFO_6
  • Date = ftDriverDate of DRIVER_INFO_6

Note that the wildcard characters, (*) for multiple characters and (?) for a single character, can be used. For example if you want to use the driver name as the equivalency test for all HP drivers you could add the following entry:

“HP*”=Name

Or use environment for both the HP LaserJet 4 and HP LaserJet 5, you could use:

“HP LaserJet ?”=Env

When checking to see which values should be used to establish equivalency, the first match will be found. For example, if a user logs on with an HP LaserJet 4 driver and the following is configured:

“HP*”=Name
“HP LaserJet 4”=Name,WinVer

Name will be the only criteria used for matching. It is recommended that wildcard character entries be placed at the end of the list.

If no entry is found in the wtsuprn.inf file, all seven criteria are used when computing the checksum.

Changes to the Inheritance of Advanced Printer Properties

The ICA 9.200 Client and Presentation Server 4.0 hotfixes PSE400R01W2K3033 and PSE400R01W2K037 and later also add the capability to inherit, retain, and restore the following settings from the Advanced tab of a printer.

Note: These settings are not written back to the client’s printer in the case of the “Win32FavorRetainedPrinterSettings=Off” setting in the client’s appsrv.ini.

Other Changes to Printer Properties

Before the ICA 9.200 Client and Presentation Server 4.0 hotfixes PSE400R01W2K3033 and PSE400R01W2K037, if a user changed a setting of a client printer inside an ICA session, these settings were saved to:

HKEY_CURRENT_USER\Software\Citrix\PrinterProperties\PrinterName

This is saved either on the client machine(if using 9.x) or the server side profile, depending on how the properties retention policy was set in Presentation Server Console. This means that printer properties were always restored from the properties store(registry) if they were present.

The ICA 9.200 Client adds the capability to add a setting to the client’s appsrv.ini file, present in “%UserProfile%\Application Data\ICAClient.” This setting allows users to set the client to always use the printer settings from the actual printer, not the retained settings in the properties store. This setting also means that the client attempts to write settings which have been modified inside an ICA session back to the printer on the client machine if the drivers have been determined to be equivalent.

To implement this feature, use the below settings:

  1. Open the client’s, “%USERPROFILE%\Application Data\APPSRV.INI” file.
  2. Under the [WFClient] section, add the following entry:
    Win32FavorRetainedPrinterSettings=Off

This document applies to:

  • Presentation Server 4.0 for Microsoft Windows 2000
  • Presentation Server 4.5 for Windows Server 2003
  • Presentation Server 4.0 x64 Edition
  • Presentation Server 4.0 for Microsoft Windows 2003
  • Presentation Server 4.5 for Windows Server 2003 x64 Edition
Search
Knowledge Center
Presentation Server
Presentation Server Clients (ICA)
XenServer
XenDesktop
NetScaler Application Delivery
Access Gateway
EdgeSight
Provisioning Server
WANScaler
Password Manager