You can faster connect printers if you want. In our domain there are more then 30 printers on multiple location. I don't use de Windows DLL to connect the printers but importing 4 registry keys instead.
Default printer:
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows]
"Device"="\\servvername\PrinterShareName,winspool,Ne00:"
PrinterPortnames:
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts]
"PrinterName"="winspool,Ne00:,15,45"
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices]
"Microsoft Office Document Image Writer"="winspool,Ne00:"
[HKEY_CURRENT_USER\Printers\Connections\,,servername,PrinterSharename]
"Server"="\\\\Servername"
"Provider"="win32spl.dll"
Printersettings are stored in
HKEY_CURRENT_USER\Printers\Connections\DevModePerUser and HKEY_CURRENT_USER\Printers\Connections\DevModes2
Al works fine on Citrix en Windows terminal server.
De only problem i have is when i use it in a logon script the defaultprinter in the script is overwritten by an old defaultprinter. Did not have an answer to that. I use it on multiple Citrix-server.