<img alt="" src="https://secure.inventive52intuitive.com/789747.png" style="display:none;">
Capturing basic printer settings in AppSense Environment Manager

Capturing basic printer settings in AppSense Environment Manager

Posted by HTG

Printer deployment and configuration, especially on XenApp/XenDesktop or similar shared systems, could be the subject of a book, never mind a blog post. There are various methods out there for managing printer deployment – Environment Manager itself, Citrix, Group Policy, third-party apps like ThinPrint, any amount of scripted routines – so I will simply concentrate on the subject, which is capturing user’s printer settings into AppSense Environment Manager.

I’ll make the assumption that most people use printers based on AD group membership (although a lot of places now have location-based printing deployment, particularly in environments that have printers that queue the jobs up and release them on a specific printer when a user enters a PIN code). AppSense offers a lot of help for innovative and creative systems admins who need to tailor print delivery specifically to varied user and hardware needs. I’ll cover specific print-related problems and solutions in future posts, but for now we’ll just concentrate on what you need to do to roam your user’s printer settings through EM.

Windows systems use the Registry to store printer settings so whether you’re using Personalization Server or not you’ll need to know the relevant keys and values. Most EM users these days tend to go for the Personalization Server option so I will work from that standpoint – but you could easily configure Registry hiving actions if Personalization isn’t in use.

Within Personalization Server, you will need to add the following Registry keys to the Desktop Settings options (8.0 and older) or Session Data (anything newer)

HKEY_CURRENT_USER\Printers
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows

This will ensure that your user’s printer settings will be captured in Personalization Server data and follow them from session to session.

Most places that deploy printers based on AD groups (particularly if the printers themselves are tied down to these groups using NTFS permissions) often don’t need to capture all of the above settings. If your users’ printers are recreated at each logon based on group memberships, then capturing all the above settings would possibly result in the roaming of inaccessible printers (due to changes in the user’s AD group memberships). In these situations, often only the default printer is captured and roamed, and all other printer connections are removed at logoff time. In the event that the user loses access to their default printer, then they will simply have to nominate another one. Note, however, that some application functionality (such as Outlook’s Print option on the context menu) rely on the default printer being set to operate correctly.

To remove all printer connections at logoff, you can use the following bit of VBScript configured as an Environment Manager Logoff Action

On error resume next
Set WshNetwork = WScript.CreateObject(“WScript.Network”)
Set oPrinters = WshNetwork.EnumPrinterConnections
For i = 0 to oPrinters.Count – 1 Step 2
WshNetwork.RemovePrinterConnection oPrinters.Item(i+1)
Next

and simply capture the following value from the Registry to retain the default printer setting

HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows
Value: Device

One final note – I’ve seen an instance before (this was at a client using mandatory profiles, so I am not sure if it’s confined to that sort of profile) where the printers didn’t become available until the second time the user tried to print. A Citrix consultant I was working with at the time told me of a trick to refresh the printer connections, by using a Process Start action for explorer.exe to run %systemdrive%\windows\system32\DeviceDisplayObjectProvider.exe. It would make sense to configure this with a Flow Control action to ensure it only runs once per session. Again, I’ve only seen this happen once, so whether it still occurs in particular circumstances or is a bug that’s been fixed, I don’t actually know.

So that’s what you need to know to capture user’s base printer settings into Personalization Server/Environment Manager. However, as printing is such a complex (and, sadly, important!) feature of any IT infrastructure, it’s very doubtful that configuring it for your own needs through AppSense will be as straightforward as this post! Users have a vast amount of needs centred around printing, and the advent of teleworking and BYOD initiatives will only make it more complicated. AppSense provides you with the tools to be able to manage these complicated requirements, though, so hopefully I can cover some more specific printing issues and solutions in later posts.

Contact

Want to partner with us?

Get in touch to learn more about our services or arrange a free 30-minute consultation with one of our Secure Cloud Experts.

Get in touch
HTG - Contact CTA