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:
- I can successfully uninstall some of the drivers, but not some others, getting the error that the driver is in use by a printer.
- 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