7

One of the troubleshooting steps in resolving printer-related issues with any version of Windows is to remove installed print drivers and then reinstall the drivers. This is a domain environment and drivers are pulled from a print server.

I've had occasion to need to do this on a user's system running Windows 7 Enterprise 64-bit. These procedures don't work:

  • Removing the printer from Devices and Printers (doesn't remove driver obviously).

  • Doing the above, going into Server Properties, and attempting to remove the driver (fails with a "driver in use" error).

  • Opening an empty mmc, adding the Print Management snap-in, and attempting to do the above (also fails with a "driver in use" error).

  • Doing sc stop spooler and sc start spooler before doing both of the above.

  • The printer is not visible in Device Manager. It's a shared network printer so maybe that has something to do with it not being there.

enter image description here

Now I know it's possible to remove drivers with the spooler service stopped and then going into the spool directory, as well as deleting registry entries. That's dangerous and I might not get everything Windows considers part of the driver.

I'm asking if a tool exists to do this where I can just select the driver in question and it be removed.

NOTE: I am remoted into the system in question via RDP.

4
  • Is the printer assigned to the workstation through group policy? Mar 14, 2014 at 16:24
  • It is. Since I've posted this question, I learned that you can look at the drivers through an mmc console but I still have to stop and start the spooler to get rid of ones that exist on the users system.
    – LawrenceC
    Mar 14, 2014 at 16:38
  • 1
    Have you logged into the machine as a local admin, unplugged the ethernet cord from the machine, and attempted to remove drivers that way?
    – AWippler
    Mar 14, 2014 at 18:40
  • I'm RDP'ing into these systems, and they are in another state. I suppose I should update the question to clarify.
    – LawrenceC
    Mar 14, 2014 at 21:18

7 Answers 7

3

Remove printer drivers

When you install a printer driver on a computer that is running Windows 7 or Windows Server 2008 R2, Windows first installs the printer driver to the local driver store, and then installs it from the driver store.

When removing printer drivers, you have the option to delete only the printer driver or remove the entire printer-driver package. If you delete the printer driver, Windows uninstalls the printer driver, but leaves the printer-driver package in the driver store to allow you to reinstall the driver at some point. If you remove the printer-driver package, Windows removes the package from the driver store, completely removing the printer driver from the computer.

To remove printer drivers from a server, use the following procedure:

To remove printer drivers

  1. Open Print Management.

  2. In the left pane, click Print Servers, click the applicable print server, and then click Printers.

  3. In the center pane, right-click those printers that use the driver that you want to delete, or change the driver that is used by each printer to another driver.

  4. In the left pane, click Print Servers, click the applicable print server, and then click Drivers.

  5. In the center pane, right-click the driver and do one of the following:

    • To delete only the installed driver files, click Delete.

    • To remove the driver package from the driver store, completely removing the driver from the computer, click Remove Driver Package.

Additional considerations
  • To open Print Management, click Start, point to Administrative Tools, and then click Print Management.

  • You must have administrative credentials to perform this task.

Additional references
4
  • 1
    Everything is fine for me until step 5 when I get an error message saying the driver is in use. This happens consistently, even after the printer is deleted from Devices and Printers, and even after a reboot. I am logged in as domain administrator when I do this.
    – LawrenceC
    Nov 20, 2011 at 23:46
  • Make sure its unplugged then.
    – wizlog
    Nov 21, 2011 at 0:02
  • It's a shared network printer.
    – LawrenceC
    Nov 21, 2011 at 0:32
  • Use Process Explorer to locate the driver in question. There is a search function on it that can help you narrow down what processes or programs are still accessing the driver in question. This could mean that the spooler service is not the only process within the system using that driver. Also check the dependencies of the spooler to see if the manufacturer did something like Lexmark used to do and not remove itself after an uninstall.
    – DJ Chateau
    Mar 18, 2014 at 19:54
2

Delete the drivers from Device Manager.

That seems like the more straight forward approach. If it still says it is in use, then you got some rogue process. I'd use SysInternal's Autoruns and Procmon to investigate further.

2
  • Printer isn't visible in Device Manager. Guess printer drivers from shared network printers don't show up here?
    – LawrenceC
    Nov 21, 2011 at 2:57
  • All drivers for printer are in Device Manager, but they may be under Hidden and you can alter that view in Device Manager > Show hidden devices. Additionally as an administrator run this command in the command prompt to also expose all devices that have ever been installed on the machine at any given time to locate that driver. SET DEVMGR_SHOW_NONPRESENT_DEVICES=1 then devmgmt.msc.
    – DJ Chateau
    Mar 18, 2014 at 19:57
0

The article Unable to remove printer driver from Windows 7 has this procedure :

  1. Remove printer in Devices and Printers
  2. Stop print spooler
  3. Open registry key
    HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Print Processors
  4. Rename all listed Print Processors, for example Winprint to Winprint.old and so on
  5. Start print spooler
  6. Remove problematic driver pack in Print Management MMC
  7. Reopen the above registry location
  8. Rename back all Print Processors to the original name, for example Winprint.old to Winprint
  9. Restart print spooler
  10. Install new printer driver
  11. Test printing

If this doesn't work and you have the installation media for the printer, another procedure might be to delete the network printer, install the printer as local, then convert it to a network printer. (Remark that there is a chance that installing the printer as local might already have taken care of the driver without need for the procedure below.)

Here is how to convert a local printer to network :

  1. Open the Printers applet from the Control Panel.
  2. Right-click on the local printer and choose Properties.
  3. Go to the Ports tab.
  4. Click Add Port…, select Local Port, then click New Port…
  5. For the port name, enter exactly the network path and share name of your printer. For example \\Windows2008\HP LaserJet 5Si, Click OK, and ensure that the checkbox next to this new port is selected.
  6. Click OK to close the printer properties.
0

You may use this...or this...If you found any of them helpful, please comment so that I can edit this again with the relevant information...

1
  • External links can break or be unavailable, in which case your answer would not be useful. Please include the essential information within your answer and use the link for attribution and further reading. Thanks.
    – fixer1234
    Jun 26, 2016 at 20:38
0

When connecting with Remote Desktop you should make sure to not activate the option Printers within Local devices and resources in MSTSC.exe.

(MSTSC.exe - Local devices and resources)

I have no explanation but when this option is activated we also had problems when trying to remove printer and drivers (maybe because of Universal Drivers that are shared between the admins printer and the user printer that should be deleted).

For network printer management on client computers we use printUI.exe (a wrapper for rundll32 printui.dll,PrintUIEntry). This command must be executed from an elevated command prompt.

Given there is a printer called PR-XX-03 on FS-ZZ-TU-1: PR-XX03 on FS-ZZ-TU-1

To remove the printer, use this command /dn (/dn = Delete Network Printer):

 printui.exe /dn /n "\\fs-zz-tu-1\pr-xx-03"

Note: You have to use the \servername\queuename format, the name displayed within Devices and Printers is “beautified” for the user.

To remove the drivers for it afterwards, you need to stop the printer spooler first because the printer DLLs are loaded within the spooler process so they can’t be removed directly:

net stop spooler
net start spooler

After that, you can remove the drivers by specifying the model of the printer (/dd = Delete Driver)

printui.exe /dd /m "Lexmark T642 (MS)"

For any printui.exe command you can also specify the option /q which will hide any error message (e.g. printui.exe /dn /n "\fs-zz-tu-1\pr-xx-03" /q). This can be useful when you want to automate these tasks.

0

You can do a complete reset of the print system using Microsoft Fixit for Printing (Windows 7: KB 2793718).

This will wipe all printers and drivers.

You can even do it without any user interaction:

msiexec /i MicrosoftFixit50979.msi /quiet

There's also a PowerShell Version.

0

Drivers/printers can be difficult to remove, especially when you are accessing a computer via remotely. What I do is open the command prompt with elevated privileges, and run printui /s /t2 That will open the print server properties. I chose the printer I need to remove, but before I click remove driver, I open services. and prepare to restart print spooler. Once I click restart print spooler, I immediately click remove as fast as I can in the print server properties. You could try stopping the spooler and then remove the print driver, but that is up to you. It works for me every time.

1
  • Can you clarify why you recommend a procedure that relies on such imprecise timing?
    – fixer1234
    Jun 26, 2016 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .