Summary
This document describes steps for troubleshooting autocreation printing issues with locally defined, physically attached or network printers.
While some of the ideas in this document apply to Imported Network Printers, troubleshooting that issue can be significantly different than the autocreation of locally defined workstation printers. Refer to CTX881017 - Troubleshooting MetaFrame XP Imported Network Print Servers.
For Universal Print Driver (UPD) troubleshooting information, refer to the following documents:
• CTX089874 - Troubleshooting and Explaining the Citrix Universal Print Driver
• CTX105158 - Troubleshooting Citrix ICA Printing - Quick Reference Guide
• CTX107137 - Troubleshooting Printing Problems In Presentation Server 4.0.
Procedure
To troubleshoot printer autocreation, follow these steps:
1. In Citrix Connection Configuration, double-click the ICA listener port, select the Client Settings button, and ensure Connect client printers at logon is selected. For Presentation Server 4.5 and later, configure these settings using the Terminal Services Configuration tool.
2. Ensure that the following boxes are not selected under the Client Settings Area:
• Disable Windows Client Printer Mapping
• Disable Client LPT Mapping
Both of these settings prevent client printers from being autocreated on the system, and prohibit the client printer from being manually added during the session.
CTX104693 - �Client Printer mapping� and �Client LPT Port mapping� are greyed out in ica-tcp listener
3. If “Inherent User Config” is selected in step 1, ensure that "connect client printers at logon" is selected in the UserConfig button for each user account within User Manager for Domains or the Environment tab within Active Directory Users and Computers/Computer Management-Local Users and Groups.
4. From the client machine:
a. Make a custom ICA connection directly to the server desktop and log on.
b. Open the printer folder inside the ICA session.
c. Add Printer > Network printer and expand Client network.
d. Select Client printer and try to Add.
e. The result may indicate:
• A suitable driver needs to be added
• Access is denied (rights issue)
• The printer is not seen under Client network (the printer needs to be defined in the local client print folder)
• If you can not expand a Microsoft server with a shared printer (possibly an OS/RPC issue)
• The “Could not connect to the printer”error message is received. Refer to CTX102808 - Error: Could not connect to the printer
• The client network cannot be seen, refer to CTX748796 - Users Unable to see the Client Network when in Print Manger or Connect to Printer
5. Current Microsoft RDP Clients allow for the creation of printers. While the RDP does not use the Citrix Client Network Service, as a test, log on with the RDP Client. This may help in determining if there is an underlying operating system or Permission issue.
6. Ensure the latest compatible driver for its operating system is installed on the client computer. On the Citrix Server, install the latest compatible driver for the base operating system (NT 4.0 Terminal Server, Windows 2000, or Windows 2003). This is accomplished by installing a "phantom" printer on the server console. After the printer has been created it can be deleted from the print manager. The driver itself and registry references to the driver will remain. Verify what drivers have been installed on the server in step 7. In Windows 2000 and 2003, right-click in the white space in the Print folder > go to Server Properties > Driver tab.
Because a printer driver is NT 4.0 or Windows 2000/2003 compatible does not necessarily mean the driver is compatible with NT 4.0 Terminal Server Edition or Windows 2000/2003 Terminal Server. Installing incompatible drivers may cause blue screens (reference Microsoft TechNet articles Q191666, Q249917, and the MetaFrame XP Feature Release/ Service Pack 2 Readme with respect to Lexmark Z12 drivers), spooler CPU spikes, hangs, print jobs failing to print, and autocreated printers failing to delete upon log off (lack of Autocreated Printer definition inside the printer properties comment field).
Issues of this type should follow the TechNet Q135406 article recommendation to remove the suspect driver from the system and to use the Management Console to configure exclusions, manual print driver mappings, or to exclusively use the UPD. Syntax, spacing, and capitalization between the quotes within the manual mapping process are critical. A substituted print driver may limit the available printer functionality inside an ICA session with respect to the non-native driver.
For details concerning manual mappings and the wtsuprn.inf file usage, see CTX626451 -Sample WTSUPRN.INF File for Use in Autocreation of Client Printers.
7. Verify which drivers have been installed on your Citrix server by checking the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments \Windows NT x86\Drivers\Version-1 (WinFrame, NT 3.51)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments \Windows NT x86\Drivers\Version-2 (NT 4.0)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments \Windows NT x86\Drivers\Version-3 (Windows 2000, 2003)
Note: The existence of the driver does not guarantee this process will work. The driver may be corrupted. The driver may need to be removed and added again.
8. Verify that administrators can autocreate client printers. If administrators can autocreate and regular users cannot, confirm that users have at least Read, Write, and Execute permissions to the following files and directory:
%SystemRoot%\System32\spool
%SystemRoot%\System32\printer.inf
Note: Autocreation of 32-bit client printers involves both the client and the server.
ICA Client printer autocreation happens during the logon process. In MetaFrame for Terminal Server Edition, ctxlogon is called directly by winlogon. In Presentation Server for Windows 2000 and 2003, ctxnotif.dll replaces Ctxlogon.exe and Ctxlogof.exe. Winlogon, specifically cmstart.exe, calls ctxnotif.dll, which makes a function call to ctxlogon to create printer connections. It handles logon/logoff notifications for specific logon processing (for example, creating printer connections).
9. For MetaFrame 1.x on NT 4.0 Terminal Server Edition, ensure users have read(RX) rights to ctxlogon.exe and ctxlogoff.exe. By default, the Everyone group is configured for read permission during the installation of MetaFrame.
10. For Terminal Server 4.0 installations, check to see if the following registry entry exists:
HKEY_LOCAL_Machine/Software/Microsoft/WindowsNT/CurrentVersion/Winlogon
Key Name: Userinit
Value: CTXLOGON.EXE
For Windows 2000 and 2003 Terminal Server installations, check to see if the following registry entry exists:
HKEY_LOCAL_Machine/Software/Microsoft/WindowsNT/CurrentVersion/Winlogon
Key Name: AppSetup
Value: Cmstart.EXE
Note: Cmstart.exe is needed to ensure wfshell is running in a session.
CTX102634 – WFSHELL.exe crashes when attempting to autocreate certain HP Print Drivers
11. MetaFrame XP Service Pack 2/Feature Release 2 changed the behavior in which client side network printers are autocreated. MetaFrame XP Service Pack 3/Feature Release 3 and later has a check box in the Management Console, under Printer Node Properties, to toggle this behavior. For MetaFrame XP Service Pack 2/Feature Release 2, see if Hotfix XE102W065 - For MetaFrame XP 1.0 for Windows 2000 Server - English or its equivalent and the corresponding registry change resolve the issue.
The hotfix introduces a registry switch so that you can toggle which functionality you want — direct connection to network printers from a Feature Release 2 server or the network printers created as client printers that print through the ICA Client device.
Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\ClientPrinterAutoCreate
Value Name: fCreateNetworkPrinter
Value Type: DWORD
Value: 1 (to have network printers created as client printers)
Value: 0 (to retain the Feature Release 2 behavior)
With this feature enabled, network printers are created as client printers in the ICA session.
For Presentation Server 3.0 and later, create a new policy, expand Printing > Client printers, print job routing there are two choices, Connect directly to network print server if possible or Always connect the printer indirectly as a client printer
12. See if any Citrix Policies to disable printing have been set in the Management Console.
13. See if any Printer Compatibility Mappings or Driver Restrictions in the Citrix Management Console apply.
14. For MetaFrame XP Service Pack 3/Feature Release 3 on Windows 2003, verify that the Feature Release 3 licenses have been obtained from My Citrix, and they have been installed and activated.
From Hotfix XE103W2K3006:
In Windows Server 2003, client printers could not be autocreated without installing a Citrix Feature Release 3 license.
Terminal services in Windows Server 2003 were changed so that the printer virtual channel needed to be created in the system context. The MetaFrame server would not issue a printer autocreation command through the printer virtual channel.
This hotfix ensures that the printer virtual channel is created in the system context and a Feature Release 3 license is no longer required.
[#63348]
15. See if the following article applies:
CTX102580 - How to Disable Printing Through NFuse/Web Interface
16. Citrix bases its autocreation of printers on client name and printer driver name, so it is recommended that each client has a unique name:
CTX376489 - Clientnames Should Always Be Unique.
The algorithm used to create the printer name may cause an issue with some applications. The issue is often the length of the name. This issue can be reproduced outside of a Citrix environment by creating the equivalent name length for a Microsoft shared printer. The application may need to be changed with respect to the way it enumerates and uses printer APIs. See Microsoft TechNet Q240082.
17. Hewlett-Packard has introduced a new architecture targeted for the home market called Print Performance Architecture (PPA). Microsoft is not supporting the PPA architecture on all of its operating systems; therefore PPA is not supported in a Citrix environment. Refer to the following:
• Microsoft article Q153958
• CTX110571 - HP Printers Supported in Citrix Presentation Server Environments
18. After verifying all of the above, if your printer still does not autocreate, confirm that the driver names are identical on the client and the server. Sometimes driver names differ marginally for Windows 95 and Windows NT 3.51/4.0. In such an instance, you need to map the names in the Ctxuprn.inf file, Wtsuprn.inf on a MetaFrame 1.8 server (this file resides in the %SystemRoot%\System32 folder), and through the Citrix Management Console or through the QPrinter.exe command on MetaFrame XP and later
Note: For the wtsuprn.inf file usage and a sample file, reference CTX626451 - Sample WTSUPRN.INF File for Use in Autocreation of Client Printers.
Printing Algorithm
The printing algorithm checks in this order:
The client printer mechanism checks the registry first. If the driver has been installed, the registry entry exists and the printer creates without a problem. If the registry entry does not exist for that particular driver, it looks in the ntprint.inf file to determine if the driver is available from the base NT installation. If it is a known driver and the installation is available (through CD or network), the driver is silently installed on the machine and the printer creation goes forward.
11. When the UPD is selected, much depends on how the Citrix Management Console configures this setting. The default setting creates the UPD after first attempting to create the printer using the native driver, following the above algorithm. This is also when using the Citrix Management Console to exclude drivers.
For additional information, see CTX089874 - Troubleshooting and Explaining the Citrix Universal Print Driver.
Process Overview
The process begins on the client side. The wfica32 calls the APIs locally to enumerate client printers and send the information to the server. These client printers may be defined locally on the client port or they can be network printers defined locally. The printer mapping file (wtsuprn.inf) is referenced to determine which driver will be used to autocreate the printer. The driver is then be installed on the server if it is available to the operating system through the ntprint.inf.
Timing
The timing of the printer autocreation depends on whether the user is connecting to a published application or directly to a server desktop.
If the user is connecting to a published application, the printer autocreation process is synchronous so that the application finds a default printer when it is executed. This is by design because some applications do not load if a default printer is not defined.
If the user is connecting to a server desktop, the printer is created asynchronously to increase the speed of log on.
The synchronous process can be toggled in MetaFrame XP and later within the individual application properties.