question

CoMpUtErGoD20XX-3060 avatar image
0 Votes"
CoMpUtErGoD20XX-3060 asked Chrism-5069 commented

Microsoft Print to PDF & XPS Document Writer Missing & Won't Reinstall

One of our machines has lost the Microsoft Print to PDF and Microsoft XPS Document Writer. I have tried the following remedies to fix this issues but nothing seems to work:

  1. Reinstall Microsoft Print to PDF using “Windows Features” (fails with 0x7 code if print spooler is active, completes if print spooler is stopped)

Microsoft Print to PDF
Microsoft XPS Document Writer

  1. Reinstall Microsoft Print to PDF Using Devices and Printers, Add Printer (fails with element not found error when selecting driver and next)

  2. Reinstall Microsoft Print to PDF Using DISM

  3. repair install windows keeping apps & files

  4. tried running sfc /scannow & all dsim tools

Any other ideas on how to resolve this issue or do I just need to format the disk and reinstall from scratch?

PS: Windows 10 Pro is the latest 20H2 version from Oct 2020. Not sure when these printers disappeared. They aren't used too often on this system.

windows-10-general
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, I am doing some research for current issue, thanks for your waiting.

0 Votes 0 ·

Thanks, will do.

0 Votes 0 ·

Hi Clif,

I am doing some research for current issue, thanks for your waiting.


0 Votes 0 ·

Hi, I am doing some research for current issue, thanks for your waiting.

0 Votes 0 ·

Sorry, probably coming a little late to the game here. Had the exact same iss with Windows 2016 server. We ended up removing all installed patches applied in 2021 and the problem disappeared. We then applied April 2021 cumulative update and all worked still. Was applying June 2021 updates when I left the office.

0 Votes 0 ·
Jingruihan-MSFT avatar image
0 Votes"
Jingruihan-MSFT answered Jingruihan-MSFT edited

Hi,

For better clarity and to assist you better I would require more information regarding this:

  1. Please run the command get-hotfix via PowerShell on the faulty win10 to see if there is an update installed recently?

  2. Have you recently upgraded from a lower version of Windows 10 to 20H2?

For now, please compare the drive folder permissions and drive file content of Microsoft Print to PDF and XPS Document Writer in your machines and whether these is the same as the normal Windows10 20H2 based on the figure below.
92142-case1.jpg
92172-case2.jpg
C:\WINDOWS\System32\DriverStore\FileRepository\prnms009.inf_amd64_a7412a554c9bc1fd
92153-case3.jpg
![92143-case4.jpg]
C:\WINDOWS\System32\DriverStore\FileRepository\prnms001.inf_amd64_8bc1bda6cf47380c
92135-case5.jpg
92134-case6.jpg

Looking forward your reply.

Best Regards



case1.jpg (180.6 KiB)
case2.jpg (183.2 KiB)
case3.jpg (333.7 KiB)
case4.jpg (55.7 KiB)
case5.jpg (235.6 KiB)
case6.jpg (92.1 KiB)
case5.jpg (235.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CoMpUtErGoD20XX-3060 avatar image
0 Votes"
CoMpUtErGoD20XX-3060 answered
  1. PS C:\WINDOWS\system32> get-hotfix

Source Description HotFixID InstalledBy InstalledOn


GNHFC42-05... Update KB4601050 NT AUTHORITY\SYSTEM 4/27/2021 12:00:00 AM
GNHFC42-05... Update KB4562830 11/19/2020 12:00:00 AM
GNHFC42-05... Security Update KB4570334 11/18/2020 12:00:00 AM
GNHFC42-05... Security Update KB4580325 11/19/2020 12:00:00 AM
GNHFC42-05... Security Update KB4586864 11/19/2020 12:00:00 AM
GNHFC42-05... Security Update KB5001330 NT AUTHORITY\SYSTEM 4/27/2021 12:00:00 AM
GNHFC42-05... Security Update KB5001405 NT AUTHORITY\SYSTEM 4/27/2021 12:00:00 AM

  1. The 20H2 upgrade was done a while ago. Not sure exactly when it was installed.

  2. When looking at control panel > devices & printers > Microsoft Print To PDF & XPS Document Writers are NOT listed. If I view the print server properties Print to PDF is NOT listed but XPS Document Writer is listed.

  3. Comparing the XPS folder permissions to the provided looks the same on my end as you have shown.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jingruihan-MSFT avatar image
0 Votes"
Jingruihan-MSFT answered Jingruihan-MSFT edited

Hi,

Thank you for waiting.

Well, is there a working fine win10 (20H2) computer in your work station?

  • If so, please completeness check whether the files and their sub-files in the following path are the same as those displayed in a working fine win10 (20H2) computer?
    Microsoft print to pdf
    C:\Windows\WinSxS\amd64_microsoft-windows-printing-printtopdf_31bf3856ad364e35_10.0.19041.1_none_382102bfe5e97ed1
    95217-image.png
    Microsoft xps docuemt writer
    C:\Windows\WinSxS\amd64_microsoft-windows-printing-xpsprint_31bf3856ad364e35_10.0.19041.488_none_8973292870393f12
    95249-image.png
    95218-image.png
    95234-image.png
    Microsoft print to pdf
    C:\WINDOWS\System32\DriverStore\FileRepository\prnms009.inf_amd64_a7412a554c9bc1fd
    xp docuemt writer
    C:\WINDOWS\System32\DriverStore\FileRepository\prnms001.inf_amd64_8bc1bda6cf47380c

  • Does the portprompt in ports point to microsoft xp document writer,microsoft print to pdf/text only?
    95293-print.png

  • Please confirm that Microsoft print to pdf and Microsoft xps docuemt writer drivers display in the list.
    ![95236-print2.png][7]


  • Please confirm that Microsoft print to pdf print and Microsoft xps document writer print registry and its subkeys in the following path are the same as those displayed in a working fine win10 (20H2) computer?
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Microsoft Print to PDF
    95237-r1.png
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Microsoft XPS Document Writer
    ![95179-r2.png


  • Please confirm that driver files Microsoft print to pdf and Microsoft xps document writer registry and its subkeys in the following path are the same as those displayed in a working fine win10 (20H2) computer?
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-4\Microsoft Print To PDF
    95323-r3.png
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-4\Microsoft XPS Document Writer v4
    ![95228-r4.png

Looking forward your reply.

Best regards


[7]: /answers/storage/attachments/95312-print2.png

[10]: /answers/storage/attachments/95313-r2.png






image.png (36.6 KiB)
image.png (21.2 KiB)
image.png (18.9 KiB)
image.png (14.4 KiB)
print.png (101.3 KiB)
print2.png (81.7 KiB)
r1.png (94.2 KiB)
r2.png (94.9 KiB)
r3.png (68.2 KiB)
r4.png (75.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CoMpUtErGoD20XX-3060 avatar image
0 Votes"
CoMpUtErGoD20XX-3060 answered

The first set of folders/files all check out and look the same on this machine as does a working Print to PDF/XPS Document writer on my main system.

Looking at the print server properties, I see portprompt listed but a printer is NOT listed next to it.

Looking at the driver tab, I see an "Microsoft XPS Class Driver, Type 4" & a "Microsoft XPS Document Writer V4, type 4". I don't see Microsoft Print to PDF.

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\
My known good machine shows the registry keys, the non-working machine does not show a folder for "Microsoft Print to PDF" or "XPS Document Writer"

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-4\
My known good machine shows the registry key, the non-working machine does not show a folder for "Microsoft Print to PDF"

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-4\Microsoft XPS Document Writer v4
My known good machine shows the registry key, the non-working machine does show the folder for "Microsoft XPS Document Writer v4" & has lots of keys inside



So, it looks like we need to repair all the reg keys and then somehow repair the printers??

Thanks,
Clif




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CoMpUtErGoD20XX-3060 avatar image
0 Votes"
CoMpUtErGoD20XX-3060 answered

Thanks, I'll await your response.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jingruihan-MSFT avatar image
0 Votes"
Jingruihan-MSFT answered

Hi Clif,

You need to find out the difference between the Microsoft Print To PDF Printer registry and the printer driver registry on the win10 (20h2) computer that good machine and non-working machine, then right-click and export the good machine Microsoft Print To PDF Printers registry and Drivers registry keys on the win10 (20h2), as shown in the following figure.
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-4\Microsoft print to pdf
98894-p1.png
Then copy the exported registry file to the problem win10 (20h2), and double-click the file to import.
98926-p2.png
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\
98866-p3.png
98952-p4.png
When these registers are in right place, and the Microsoft Print To PDF and Microsoft XPS Document Writer driver files mentioned just now are not missing, add a Microsoft Print To PDF printer through the control panel to reinstall.
98928-p5.png
It's gonna be complicated if the problem persists, because Microsoft Print To PDF and Microsoft XPS Document Writer are built-in printers in the system. It is recommended that you back up the data, and then reset the win10 (20h2) system to see what will happen after the initial installation state of win10 (20h2) is restored. To reset PC, please refer to the following Microsoft articles:
https://support.microsoft.com/en-us/windows/how-to-refresh-reset-or-restore-your-pc-51391d9a-eb0a-84a7-69e4-c2c1fbceb8dd
And a video link :HOW TO RESET WINDOWS 10 GUIDE!
https://www.youtube.com/watch?v=gppoGXYTZh8
99001-p6.png

If the answer is helpful, please click "Accept Answer" and upvote it.

Best Regards



p1.png (73.8 KiB)
p2.png (15.6 KiB)
p3.png (64.4 KiB)
p4.png (65.4 KiB)
p5.png (39.1 KiB)
p6.png (180.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CoMpUtErGoD20XX-3060 avatar image
0 Votes"
CoMpUtErGoD20XX-3060 answered

I matched the registry keys from a known good PC. The printer gets added back now automatically at PC reboot. However, if I tried to print and it tells me a driver is not installed. When I try to add the add the driver "Microsoft Print To PDF" is not an option. If I click Windows Update it still doesn't appear. Any ideas on how I can add the driver back?

IF I take a look at the print server properties I can see "Microsoft Print To PDF" listed as an option there so I don't understand why the system isn't seeing it in the other selection box.

100645-01.png


100646-02.png

100673-03.png

100584-04.png



01.png (11.1 KiB)
02.png (7.0 KiB)
03.png (9.5 KiB)
04.png (32.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jingruihan-MSFT avatar image
0 Votes"
Jingruihan-MSFT answered

Hi,

Well, because Win10 system driver file is not well registered in the registry so that it’s really complicated to handling this cases now. If your working space is not cumbersome, I suggest you back up your data and prepare to reset your computer.

Let me know if you need anything else.

Best Regards.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CoMpUtErGoD20XX-3060 avatar image
0 Votes"
CoMpUtErGoD20XX-3060 answered

This is just a followup for anyone else that finds this ticket later and faces the same issue. After roughly 8+ hours of diagnosing and trying different solutions nothing resolved the issue.

I am reloading the OS from scratch.

Best!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AndyMichel-8552 avatar image
0 Votes"
AndyMichel-8552 answered

Hi Everyone

I fixed the issue with all the following steps:

  1. Export the affected Keys from those two paths from a working system
    HKLM\System\CurrentControlSet\Control\Print\Printers
    HKLM\System\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-4.

  2. Delete them on the problematic system and import the exported files.

  3. Delete all the ntprint and the “prnms003…” & “prnms009…” from “C:\Windows\System32\DriverStore\FileRepository" on the problematic system

  4. Copy those directories from a working system to the problematic one.

  5. uninstall all recent patches (last two weeks)

  6. Restart the system.

  7. After this, the printer are showing up again, but don't work.

  8. Now it is possible to delete and reinstall them.

  9. Maybe you need to disable and enable the optional features again. Please consider stopping the spooler for enabling the features.



Sorry for this short description, reach out to me if further information is needed.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.