XPS Document Writer fails on Server 2016

Copper Contributor

I have a copy of Windows Server 2016 running as a VM on a Dell PowerEdge with VMWare. This server is set up to be an application server, hosting QuickBooks Enterprise 2021.


A few weeks ago QuickBooks was suddenly unable to generate PDFs. After troubleshooting the cause it turns out that the XPS Document Writer had disappeared. The driver for the MXDW is still installed in the system. I cannot get the server to actually install a printer using that driver, which QuickBooks needs to generate PDFs. 


When attempting to install the printer manually with the Add Printer Wizard:

>Add a local printer with manual settings

>Use an existing port - PORTPROMPT: (Local Port)

>Select driver "Microsoft XPS Document Writer v4"

**NOTE: Have done this from Windows Update, and also selecting the actual driver from the driver store by selecting "have disk"**

>Two different errors are generated depending on what is selected next:

>>Use the driver that is currently installed - ERROR "Unable to install printer. The handle is invalid"

>>Replace the current driver - ERROR "Printer driver was not installed. Element not found."


When attempting to install the printer through the Print Management interface:

>Right click "Printers" under SERVER, select "Add Printer"

>Add a new printer using an existing port: PORTPROMPT: (Local Port)

>Use an existing printer driver on the computer - select from dropdown menu - "Microsoft XPS Document Writer v4"

>Printer Name - "Microsoft XPS Document Writer v4"

>ERROR - Unable to install printer. The handle is invalid.


Steps tried:

Step - sfc /scannow

Result - 

Beginning system scan. This process will take some time.

Beginning verification phase of system scan.
Verification 100% complete.

Windows Resource Protection found corrupt files but was unable to fix some
of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For
example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not
supported in offline servicing scenarios.


Step - DISM /Online /Cleanup-Image /RestoreHealth

Result - 

Deployment Image Servicing and Management tool
Version: 10.0.14393.4169

Image Version: 10.0.14393.4169

Error: 0x800f081f

The source files could not be found.

**NOTE: I have tried using a known good server, live and running, as a source. I have also tried using the install ISO as a source.**


Step - DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase

Result - 

Deployment Image Servicing and Management tool
Version: 10.0.14393.4169

Image Version: 10.0.14393.4169

The operation completed successfully.


The one time I enjoyed any success was last week. I decided to uninstall the most recent security updates. After doing so and rebooting the server I was able to install the MXDW and QuickBooks was able to generate PDFs! Yay! The following week, without installing any updates whatsoever, the problem returned. Now I am stuck. I have run Windows Update again and installed the latest patches. No joy. I have uninstalled those patches. No joy.

1 Reply
Do you have access to Windows 10 device?
If yes, open start and search for feedback and open Feedback Hub app and report this issue and attach these files there. In the list, select Windows Server.