VMware Horizon Community
TomH201110141
Enthusiast
Enthusiast

Default printer does not get saved.

I have the problem that my default printers get not saved. The "Network Printers.zip" is getting saved but with the wrong default printer. The XML inside the zip-file shows me:

<?xml version='1.0' encoding='utf-8'?>
<defaultPrinter name="Microsoft Print to PDF (vdi)"/> 

... instead the name of one of our network printers.

I have read that in the past ThinPrint could hijack the default printer but TP is not part of the Horizon agent anymore. We are running Horizon 8.1 with DEM 2103.

This are our common settings to save the printer settings:

[SpecialSettings]
DefaultPrinter

[IncludeRegistryTrees]
HKCU\Printers
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Devices
HKCU\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts

[IncludeIndividualRegistryValues]
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\UserSelectedDefault\[SKIPLOGGING]

 

What could be wrong? 

Labels (2)
Reply
0 Kudos
29 Replies
TomH201110141
Enthusiast
Enthusiast

Hi @DEMdev I see an error in the Debug-Log:

"Error 3012 trying to map user's preferred default printer".

Maybe the mapping occurs before the printer is ready. The complete log you find in the SR.

 

Thanks, Tom

Reply
0 Kudos
sjesse
Leadership
Leadership

Can you do it manually when you login  though? Thats a windows specific error code, and generally you should see that if you try without DEM .

Reply
0 Kudos
TomH201110141
Enthusiast
Enthusiast

Yes, I can define any printer as the default printer without any problem.

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee

Hi @TomH201110141,

I got the logs from the SR, thanks.

When trying to restore a user's preferred default printer setting without VIP (or with VIP disabled), the DEM agent checks whether that printer has actually been mapped. If it hasn't, the agent tries to map the printer, as it can't set a printer as the default if that printer has not been mapped.

That error code 3012 is ERROR_PRINTER_NOT_FOUND, AKA "No printers were found." Our "normal" printer mapping logic (for printers mapped through DEM's Printer Mappings configuration) takes that error into account and performs a number of retries which typically make things work. I just noticed that our "just-in-time printer mapping" call for restoring the user's default does not perform such a retry, which is probably what we're seeing here.

I don't see a workaround on the DEM side at this moment, but maybe the following would work: instead of disabling VIP for certain users, could you try configuring the Specify a filter in redirecting client printers VIP policy setting (through DEM's ADMX-based settings, or GPO) to something like PrinterName=".*"? That would/should match every client printer, meaning that none of them will get redirected, as this setting is a deny list.

TomH201110141
Enthusiast
Enthusiast

Hi @DEMdev 

Yes, I think you are right. I don't see it as an error from DEM. I will try other workarounds like you said.

 

TomH201110141
Enthusiast
Enthusiast

Hello @DEMdev I wanna give you an update after some time of testing:

I created a "Windows Common Setting" called "Default printer" to save the default printer. It is more reliable than predefined "Network Printers". And we decided never to disable VIP.

I would say "Network Printers" was 90% reliable and had a very big disadvantage: before the user desktop appears (after GPO settings) we see a black screen for 15 to 20 seconds. I can't tell what happens in this period of time.

The only difference between the predefined setting "Network Printers" and the Windows Common Setting "Default printer" is that with "Network Printers" 3 additional registry keys are stored:

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

But why do they slow down the login-process so dramatically? The Network Printers Archive is only 7KB.

The disadvantage of the Windows Common Setting is that no printer properties will be saved.

Reply
0 Kudos
norgemauli
Contributor
Contributor

are you mapping printer synchronously? That slowed us down a bunch.. 

Reply
0 Kudos
TomH201110141
Enthusiast
Enthusiast

@norgemauli No, we run it always asynchronously.

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee

Hi @TomH201110141,

Aren't printers fun? 😉 Although DEM just restores a bit of additional registry information (which should be pretty much instantaneous), that causes Windows to map the previously captured printers again, which is the potentially time-consuming part. Are the printer drivers installed in the base image?

Reply
0 Kudos
TomH201110141
Enthusiast
Enthusiast

Yes, printers are insane!

We have reinstalled all printer drivers and the logon-time ist now much better when using "Network Printers". We are still investigating the reliability of setting the default printer.

Reply
0 Kudos