Citrix Metaframe 4 and the Curse of the Mysterious Offline Printers
It was a cold, dark, day in the office, and an eerie presence could be felt lingering in the air.
It was the ghost printers, hanging around on our Citrix servers, not disconnecting after the user sessions had long been terminated.
OK, so my novel writing skills leave a lot to to be desired. But having spent the last day trying to figure this out, I thought I might as well share it with the world.
Let me start with our setup. A Citrix farm of 8 servers, running Microsoft Windows Server 2003 R2, and Citrix Metaframe Presentation server 4.
It started with the print spooler. Our Citrix Servers started killing their own print spoolers, which obviously meant that our users were unable to print. When we checked in the Printers folder, we noticed that, although all the users had logged off of their sessions, the autocreated printers remained connected, with the status of ‘Offline’.
The first thing we wanted to do, pretty much knowing that this was a print driver issue, was remove the printer drivers, and leave the server with the default Citrix Universal Print driver. However, trying to delete the drivers from Printers > Server Properties > Drivers tab resulted in an error message informing us that the printers were in use and could not be removed. So I guess, even though the printers were offline, Windows still wanted to keep the driver in the store.
After rooting around for a bit, we foundĀ a registry key that actually stored all of the printer sessions. It was located here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers
We exported the key (just in case) and went through and deleted all the subkeys.
Once that was done, it was just a case of restarting the print spooler and deleting all the drivers again. As if by magic, they disappeared, and we lived happily ever after. (after a server reboot).
Just a little side note, it might be worth using printmig.exe (Print Migration tool from Microsoft) to backup all of your printer drivers before you do this, just in case you delete something you wish you hadn’t. And don’t forget to leave the Citrix Universal Print driver, otherwise you will find your users won’t be able to print anything!








