Score:0

Windows Server 2012 R2: Cannot remove some printer driver ("are in use" error) - Stale (orphan) entries in registry

us flag

I'm trying to uninstall some printer drivers from a Windows 2012 R2 Remote Desktop Services Host. I want that, except for some particular printer, the Easy print driver has to be used. The policy in place is: "if there is a specific driver available use it, else use Remote Desktop Easy Print driver".

I have two issues here:

  1. I can successfully uninstall some of the drivers, but not some others, getting the error that the driver is in use by a printer.
  2. Uninstalled drivers are automatically reinstalled when my users connect back to the RDS Host.

Issue 1):

  • I've tried both "Delete" and "Remove driver package". Same result.
  • I tried to stop and restart the spooler service. Same result.
  • I rebooted the server. Same result.
  • I have done it through powershell (Remove-PrinterDriver). Same result.

So I digged a bit through the registry, with all my users disconnected and the sessions closed. I found some stale entries at the following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\

For example:

Orphan driver entries pic

They are different from other "legitimate" entries that I see when users are connected, for example:

legit driver entries pic

So, my question is: is it safe to delete the stale ones directly from the registry and then retry the removal process? Is there anything else that I can try to remove printer drivers shown as "in use" by the OS?

Issue 2):

  • Why are the uninstalled drivers (through the "Remove driver package" menu entry) getting reinstalled once my users reconnect to the RDS host?

Thanks in advance. Francesco

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.