RDS Host: Cannot remove some printer driver ("are in use" error) - Stale (orphan) entries in registry - Removed drivers are automatically reinstallaed

BK IT Staff 251 Reputation points
2022-03-01T10:33:50.213+00:00

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 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 with the sessions closed. I found some stale entries at the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\

For example:
178835-immagine.png

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

178857-immagine.png

So, my question is: is it safe to delete the stale ones directly from the registry?

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

Windows for business | Windows Client for IT Pros | User experience | Remote desktop services and terminal services
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. BK IT Staff 251 Reputation points
    2022-03-02T08:31:38.15+00:00

    Please, is it possibile to get some help here?

    Thanks,
    Francesco

    0 comments No comments

  2. Limitless Technology 39,921 Reputation points
    2022-03-08T04:31:09.597+00:00

    Hi @BK IT Staff

    If the drivers are getting reinstalled you may try adding them to the prohibited list with the help of GPO and this might prevent them from installing again.

    I doubt that the reason for the reinstallation of the drivers might also be with your GPO which forces the drivers once the user's login. To test this try creating a new user without adding it to any group or GPO and check if the drivers are getting reinstalled there.

    Prevent installation of specific drivers
    https://learn.microsoft.com/en-us/windows/client-management/manage-device-installation-with-group-policy

    Hope this resolves your Query!!

    ----------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  3. BK IT Staff 251 Reputation points
    2022-03-08T08:43:52.14+00:00

    Hi @Limitless Technology , thanks for answering! That is for issue 2). Regarding instead the issue 1) ?

    Thank you,
    Francesco

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.