VMware Horizon Community
eball1221
Contributor
Contributor
Jump to solution

Windows 10 1809/1903 Printer Mapping/Default Settings

I am using DEM 9.11, Horizon 7.11, and AppVolumes 2.18 for my environmnet.  Users are experiencing issues with printers not mapping correctly, disappearing, and default printers not saving.  I have read numerous posts about what config.ini settings to have:

pastedImage_0.png

and whether or not to have asynchronous mapping, which I do not.  I have opened a case with VMware support and wanted to reach out the the community for your input as well.  All printers are mapped via DEM via IP address for branch location purposes.  Thin print on the Gold Image has been disabled, and all printers on the server have been updated with the most recent driver. 

1 Solution

Accepted Solutions
DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

6-12 seconds is ok, but preferable would be to cut down the login times as much as we can for user experience.  All help has been appreciated as user printers complaints have subsided, now I believe further tuning with async mapping and roaming the default printer.  Is there an article that points to the configs for that?

As mentioned earlier in this thread, roaming the user's preferred default printer is a bit tricky when mapping printers asynchronously. We need to make sure that the profile archive containing the user's printing preferences is imported only after the printers have been mapped. That works fine for printers that are mapped synchronously, as that happens before profile archive import, but that's no longer the case once the printer mappings are changed to async.

The workaround is as follows:

  1. Configure the printer mappings to be synchronous. (This is necessary to make sure that step 3 works correctly.)
  2. Configure the advanced configuration setting Disable DEM Printer Mappings during logon.
  3. Create a script that "refreshes" the printer mappings (effectively mapping them for the first time in that session, as they were skipped during logon), followed by an import of the user's printer-related profile archive.
    Because the printer mappings were configured as synchronous (as per step 1), we can be sure that they have completed by the time the printer mapping refresh finishes.
  4. Launch that script.

Step 1 is simple, as printers are already being mapped synchronously in your current setup.

Step 2 – Configure the Disable DEM Printer Mappings during logon policy setting (available in the advanced ADMX template), or the NoAD equivalent: UEMActionPrinterMappingDuringLogon="0". Be sure to pick the "during logon" variant:

pastedImage_3.png

Otherwise, printer mapping will be disabled completely.

Step 3 – The script could be something like this:

@echo off

setlocal

set FlexEngine="C:\Program Files\Immidio\Flex Profiles\FlexEngine.exe"

set PrinterArchive="%UEMProfileArchives%\Printers.zip"

%FlexEngine% -UEMRefreshPrinters

if exist %PrinterArchive% %FlexEngine% -r %PrinterArchive%

You would need to make sure that the path to the profile archive mentioned on line 4 is correct for your environment.

Step 4 – To launch the script, you have a few options. You could run it as a custom command once App Volumes has attached all AppStacks:

pastedImage_30.png

Or you could launch it as soon as File Explorer has started, by creating a shortcut in the Startup folder.

Or you could launch it as an After profile archive import Logon Task, although I would suggest adding a delay to the start of the script then, so as not to compete for resources with the logon process.

View solution in original post

20 Replies
DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

A few initial questions:

  • Are there any printer-related error messages being logged?
  • Are the printer drivers installed in the base image?
  • What does "printers disappearing" mean exactly? Available in one session, but missing in the next? Initially available but then missing within the same session?
  • Any reason for mapping the printers synchronously?

Alternatively: if you have already provided this info to VMware support, can you DM me the ticket number?

Reply
0 Kudos
eball1221
Contributor
Contributor
Jump to solution

Hello,

1. I do not see any printer error messages being logged except scheduled for mapping within the DEM logging.

2. Printer drivers ARE installed on the gold image prior to deployment

3. Dissappear would mean printer there on day 1, then on day 2 it is not mapped, or grayed out.

4. Asynchronis to help reduce login times. 

I do have a case open, 20121582005

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

Thank you for the additional information.

1. Any error messages in the FlexEngine-async.log?

2. Great!

4. I was confused by the "whether or not to have asynchronous mapping, which I do not" from your original post; happy to hear you are mapping them async.

As for #3, this might very well be related to App Volumes. In the SR I did not see any mention of that, so please make sure that VMware Support knows that that is in play as well. I only have a very limited view on the ticket, so they might already be aware of that, but just in case.

Reply
0 Kudos
eball1221
Contributor
Contributor
Jump to solution

Hello DEMdev,

Thank you for your assistance.

1. the async logs for the users that are experiencing this issue are locked during the issue time.  Below is a snippit of a user:

2020-04-29 07:28:51.951 [DEBUG]    User: , Computer: W10, OS: x64-win10 (Version 1903, BuildNumber 18362.778, SuiteMask 100, ProductType 1/4, Lang 0409, IE 11.778.18362.0, VMware VDM 7.11.0, App Volumes 2.18.2.27, DEM 9.11.0.932, ProcInfo 1/1/2/2, UTC-07:00D), PTS: 4564/3052/1C

2020-04-29 07:28:51.972 [DEBUG] Processing pending async DEM settings

2020-04-29 07:28:52.345 [INFO ] Skipping creating shortcut in programs menu as shortcut already exists ('UEM ADMX-based settings Refresh.xml')

2020-04-29 07:28:52.356 [INFO ] Skipping creating shortcut in programs menu as shortcut already exists ('UEM Printer Refresh.xml')

2020-04-29 07:28:52.364 [INFO ] Skipping creating shortcut on desktop as shortcut already exists ('UEM Self-Support.xml')

2020-04-29 07:28:52.365 [INFO ] Skipping creating shortcut in programs menu as shortcut already exists ('UEM Self-Support.xml')

2020-04-29 07:28:52.370 [INFO ] Skipping creating shortcut on desktop as shortcut already exists ('UEM User Environment Refresh.xml')

2020-04-29 07:28:52.370 [INFO ] Skipping creating shortcut in programs menu as shortcut already exists ('UEM User Environment Refresh.xml')

2020-04-29 07:29:26.234 [ERROR] Spooler service not running -- failed to map printer '\\azdcp-prt01\AZDVA-CMF' (tried 13 times; waited 7800 ms) ('AZDVA-CMF.xml')

2020-04-29 07:29:26.236 [DEBUG] Spooler service is not running -- Retrying in 1000 ms

2020-04-29 07:29:40.261 [INFO ] Successfully mapped printer '\\azdcp-prt01\AZDVC-BMF' (took 2 tries; waited 1000 ms) ('AZDVC-BMF.xml')

2020-04-29 07:30:04.657 [INFO ] Successfully mapped printer '\\azdcp-prt01\azdvn-bmf' (took 2 tries; waited 100 ms) ('AZDVN-BMF.xml')

2020-04-29 07:30:08.556 [INFO ] Successfully mapped printer '\\azdcp-prt01\AZDVS-BMF' (took 6 tries; waited 1500 ms) ('AZDVS-BMF.xml')

2020-04-29 07:30:08.872 [INFO ] Successfully mapped printer '\\azdcp-prt01\AZDVT-BMF' ('AZDVT-BMF.xml')

2020-04-29 07:30:09.466 [INFO ] Successfully mapped printer '\\azdcp-prt01\AZDVT-CMF' ('AZDVT-CMF.xml')

2020-04-29 07:30:09.468 [DEBUG] Processed 6 DEM printer mappings (5 successful, 1 error)

2020-04-29 07:30:09.469 [DEBUG] Processed 4 DEM shortcuts (4 skipped)

2020-04-29 07:30:09.470 [INFO ] Done (77521 ms) [<<IFP#dc5a580b-3456be]

2020-04-30 07:25:51.129 [INFO ] Performing async DEM actions [IFP#2d01a1ea-729a9>>]

2020-04-30 07:25:51.131 [DEBUG]    User: , Computer: , OS: x64-win10 (Version 1903, BuildNumber 18362.778, SuiteMask 100, ProductType 1/4, Lang 0409, IE 11.778.18362.0, VMware VDM 7.11.0, App Volumes 2.18.2.27, DEM 9.11.0.932, ProcInfo 1/1/2/2, UTC-07:00D), PTS: 2608/4664/1C

2020-04-30 07:25:51.137 [DEBUG] Processing pending async DEM settings

2020-04-30 07:25:51.604 [INFO ] Skipping creating shortcut in programs menu as shortcut already exists ('UEM ADMX-based settings Refresh.xml')

2020-04-30 07:25:51.615 [INFO ] Skipping creating shortcut in programs menu as shortcut already exists ('UEM Printer Refresh.xml')

2020-04-30 07:25:51.626 [INFO ] Skipping creating shortcut on desktop as shortcut already exists ('UEM Self-Support.xml')

2020-04-30 07:25:51.626 [INFO ] Skipping creating shortcut in programs menu as shortcut already exists ('UEM Self-Support.xml')

2020-04-30 07:25:51.638 [INFO ] Skipping creating shortcut on desktop as shortcut already exists ('UEM User Environment Refresh.xml')

2020-04-30 07:25:51.640 [INFO ] Skipping creating shortcut in programs menu as shortcut already exists ('UEM User Environment Refresh.xml')

2020-04-30 07:26:13.505 [ERROR] Spooler service not running -- failed to map printer '\\azdcp-prt01\AZDVA-CMF' (tried 14 times; waited 9100 ms) ('AZDVA-CMF.xml')

2020-04-30 07:26:13.506 [DEBUG] Spooler service is not running -- Retrying in 1000 ms

2020-04-30 07:26:28.585 [INFO ] Successfully mapped printer '\\azdcp-prt01\AZDVC-BMF' (took 4 tries; waited 3300 ms) ('AZDVC-BMF.xml')

2020-04-30 07:26:31.398 [INFO ] Successfully mapped printer '\\azdcp-prt01\azdvn-bmf' (took 2 tries; waited 100 ms) ('AZDVN-BMF.xml')

2020-04-30 07:26:34.315 [INFO ] Successfully mapped printer '\\azdcp-prt01\AZDVS-BMF' (took 3 tries; waited 300 ms) ('AZDVS-BMF.xml')

2020-04-30 07:26:36.303 [INFO ] Successfully mapped printer '\\azdcp-prt01\AZDVT-BMF' (took 3 tries; waited 300 ms) ('AZDVT-BMF.xml')

2020-04-30 07:26:38.851 [INFO ] Successfully mapped printer '\\azdcp-prt01\AZDVT-CMF' (took 2 tries; waited 100 ms) ('AZDVT-CMF.xml')

2020-04-30 07:26:38.855 [DEBUG] Processed 6 DEM printer mappings (5 successful, 1 error)

2020-04-30 07:26:38.855 [DEBUG] Processed 4 DEM shortcuts (4 skipped)

2020-04-30 07:26:38.856 [INFO ] Done (47727 ms) [<<IFP#2d01a1ea-729a9]

I turned off the async on printers during this issue.  The print spooler service is set to automatic for the gold image.

We do have appvolumes in play, but no writable's.  I only deploy appstacks to the users.

Reply
0 Kudos
ijdemes
Expert
Expert
Jump to solution

The printer spooler (re)starting is curious.

What happens when you don't have AppStacks in play? Do you have the same (mixed) results, or is it (more) stable?

Did you take a look at his article yet? Maybe this may help you. --> https://kb.vmware.com/s/article/2137401

What happens when you refresh the printers after logon? --> "C:\Program Files\Immidio\Flex Profiles\FlexEngine.exe" -UemRefreshPrinters

What happens when you import saved printers/printer settings after logon? --> "C:\Program Files\Immidio\Flex Profiles\FlexEngine.exe" -r "\\server\share$\%username%\Windows Settings\Printers.zip" (Change the path to the ZIP file accordingly.)

By default, I disable "Let Windows manage my default printer" --> https://www.printandshare.info/kb/articles/00003/how-to-set-the-default-printer-in-windows-10-back (See solution 2)

I'm curious to hear the results...


\\ Ivan
---
Twitter: @ivandemes
Blog: https://www.ivandemes.com
DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

Thank you for the async log. If that log file remains locked for a long time, it means that DEM is waiting for Windows to complete a printer mapping – if that hangs for some reason, so will DEM's async processing (and the corresponding logging.)

As for the spooler-related log messages: those are most probably the result of App Volumes actions, as App Volumes restarts the spooler service as part of attaching AppStacks.

I don't know much about App Volumes, so I can't provide any guidance or suggestions there, I'm afraid. With some advanced settings on the DEM side, you could test whether printer mapping works better when it does not happen in parallel with App Volumes activity.

To do that, you need to configure the Disable DEM Printer Mappings during logon policy setting (available in the advanced ADMX template), or the NoAD equivalent: UEMActionPrinterMappingDuringLogon="0". This will make the DEM agent ignore any printer mappings during logon.

To have the printers mapped once App Volumes has completed attaching AppStacks, define a triggered task:

pastedImage_20.png

Note that this will definitely interfere with correctly roaming the user's preferred default printer, but let's first focus on getting the printers mapped correctly.

eball1221
Contributor
Contributor
Jump to solution

Hello,

I performed the DEM setting as requested.  I am assuming in the advanced ADMX template, mark printer mappings to Disabled.   I have turned off async printer mappings so the users can map their printers.  Since doing that I have not received calls about printers not appearing, or greyed out this week, which is a good sign.  Does async mappings have that much effect on login times that they are necessary, or depending on environment.

Second, once mappings are resolved, which we are close, what are the additional settings for the users default to stick?

Thank you again DEMDev.

Reply
0 Kudos
eball1221
Contributor
Contributor
Jump to solution

Hello ijdemes,

Thank you for your reply.  As per VMware support I created the VolLoadDelaytime and set to 20 for some app stack issues in the past.  However, this may be attributing to the default/printer mapping issues?  That is curious.  I created a trigger settings as per DEMDev to map printers after app volumes attaches to see how that effects things.

Also, thanks for the tip on the default printer reg setting, I will put that in place going forward.

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

I am assuming in the advanced ADMX template, mark printer mappings to Disabled.

It should be the during logon setting:

pastedImage_3.png

Otherwise, printer mappings will never be performed.

I have turned off async printer mappings so the users can map their printers.  Since doing that I have not received calls about printers not appearing, or greyed out this week, which is a good sign.  Does async mappings have that much effect on login times that they are necessary, or depending on environment.

If mapping printers synchronously does not impact your logon times (too much) and addresses the problems you were having: perfect! We generally recommend to map asynchronously so the time it takes to map printers (and install drivers, if they're not in the base image) does not affect the logon itself. But again, if that's sufficiently fast for you if you map them synchronously, by all means do that to keep things simple. In that case you would also not need the disable-printer-mapping-at-logon-and-refresh-the-printers-after-all-AppStacks-are-attached workaround, of course.

Second, once mappings are resolved, which we are close, what are the additional settings for the users default to stick?

If you're successfully mapping printers synchronously, roaming the users' preferred default printer should work just fine with the built-in template. So let's take another look at that once you have sufficient user feedback about printers no longer disappearing or being shown as greyed out.

eball1221
Contributor
Contributor
Jump to solution

Hello DEMdev,

I performed the tasks and the GPO for printer mapping at login created some issues where the printers would not map unless I manually perform a printer refresh.  I may have missed a step.  However, I removed that portion and the printers are mapping as needed as I have not heard any issues from the end users in over a week, so that is good news.  The next topic is the persisting default.  Also, should I slowly re-add async back to all printers to aide login times?

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

the printers are mapping as needed as I have not heard any issues from the end users in over a week, so that is good news.

Good news, indeed!

The next topic is the persisting default.  Also, should I slowly re-add async back to all printers to aide login times?

How long does it currently take to map those printers synchronously? If that's "acceptable" (subjective, I know) in relation to the overall time it takes for DEM to process its logon activities, you might want to just stick with that. Roaming a user's preferred default printer in combination with async mapping takes a bit of configuration, unfortunately. We're thinking about ways to make that more straightforward, but that's still very much a work in progress.

Reply
0 Kudos
MaxStr
Hot Shot
Hot Shot
Jump to solution

One issue I have noticed with newer versions of Windows is when mapping a network printer, Windows will first attempt to poll Windows Update to find a driver before it checks for local drivers.  I had this issue with Xerox, because the VDI was checking Windows Update each time the printer was mapping, but since I have WU disabled it was just timing out. (It also was trying to install a Microsoft Store app for the printer)

I had to do two things to resolve this issue: First, if your VDI has Windows Update disabled/locked down, you also need to disable the GPO setting to search WU for drivers when installing new hardware in GPO because it will still attempt to search for a driver. Second, you should use the V3 version of the printer driver, because the V4 drivers have UWP stuff built-in (V4 Printer Driver - Windows drivers | Microsoft Docs )

eball1221
Contributor
Contributor
Jump to solution

Hello DEMdev,

We are averaging between 40-120 seconds on a login depending on the user profile.  With app volumes and profiles I do believe that is average, if not performing well. 

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

And how much of that is for printer mapping?

Reply
0 Kudos
eball1221
Contributor
Contributor
Jump to solution

Hello,


It looks like 6-12 seconds total.  A lot need multiple tries until it maps like below: 

pastedImage_0.png

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

Do you find those 6-12 seconds for synchronous printer mapping acceptable, for a path-based import that takes 40-120 seconds overall?

We can try making them async and use some tricks to ensure that the user's preferred default printer still roams correctly in that case, but that will require a bit of tweaking (similar to what I described before.)

eball1221
Contributor
Contributor
Jump to solution

Hello DEMdev,

6-12 seconds is ok, but preferable would be to cut down the login times as much as we can for user experience.  All help has been appreciated as user printers complaints have subsided, now I believe further tuning with async mapping and roaming the default printer.  Is there an article that points to the configs for that?

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

6-12 seconds is ok, but preferable would be to cut down the login times as much as we can for user experience.  All help has been appreciated as user printers complaints have subsided, now I believe further tuning with async mapping and roaming the default printer.  Is there an article that points to the configs for that?

Fair enough; I fully understand the desire to make the logon as fast as possible. There's no ready-made material available, so I'll write up something tomorrow.

DEMdev
VMware Employee
VMware Employee
Jump to solution

Hi eball1221,

6-12 seconds is ok, but preferable would be to cut down the login times as much as we can for user experience.  All help has been appreciated as user printers complaints have subsided, now I believe further tuning with async mapping and roaming the default printer.  Is there an article that points to the configs for that?

As mentioned earlier in this thread, roaming the user's preferred default printer is a bit tricky when mapping printers asynchronously. We need to make sure that the profile archive containing the user's printing preferences is imported only after the printers have been mapped. That works fine for printers that are mapped synchronously, as that happens before profile archive import, but that's no longer the case once the printer mappings are changed to async.

The workaround is as follows:

  1. Configure the printer mappings to be synchronous. (This is necessary to make sure that step 3 works correctly.)
  2. Configure the advanced configuration setting Disable DEM Printer Mappings during logon.
  3. Create a script that "refreshes" the printer mappings (effectively mapping them for the first time in that session, as they were skipped during logon), followed by an import of the user's printer-related profile archive.
    Because the printer mappings were configured as synchronous (as per step 1), we can be sure that they have completed by the time the printer mapping refresh finishes.
  4. Launch that script.

Step 1 is simple, as printers are already being mapped synchronously in your current setup.

Step 2 – Configure the Disable DEM Printer Mappings during logon policy setting (available in the advanced ADMX template), or the NoAD equivalent: UEMActionPrinterMappingDuringLogon="0". Be sure to pick the "during logon" variant:

pastedImage_3.png

Otherwise, printer mapping will be disabled completely.

Step 3 – The script could be something like this:

@echo off

setlocal

set FlexEngine="C:\Program Files\Immidio\Flex Profiles\FlexEngine.exe"

set PrinterArchive="%UEMProfileArchives%\Printers.zip"

%FlexEngine% -UEMRefreshPrinters

if exist %PrinterArchive% %FlexEngine% -r %PrinterArchive%

You would need to make sure that the path to the profile archive mentioned on line 4 is correct for your environment.

Step 4 – To launch the script, you have a few options. You could run it as a custom command once App Volumes has attached all AppStacks:

pastedImage_30.png

Or you could launch it as soon as File Explorer has started, by creating a shortcut in the Startup folder.

Or you could launch it as an After profile archive import Logon Task, although I would suggest adding a delay to the start of the script then, so as not to compete for resources with the logon process.