Home Windows Fixing printing in Windows, 101

Fixing printing in Windows, 101

by Tommy Andersen
0 comment

We haven't seen the last printer related issue yet.

Printing. One of the most basic features of any computer and it still cause so many problems for so man people. Between legacy printer drivers, millions of printer brands/models as well as outdated drivers shipped with each printer sold – then no: We haven’t seen the last printer related issue yet.

That old driver

Many printer drivers from “back in the day when I bought my old printer” simply aren’t compatible with newer versions and/or 64 bit version of Windows. This can cause Windows to seemingly “loose” the connection to printers from time to time. The culprit is usually the driver, which can cause the local print Spooler or Netbios service to stall or crash completely. Now, obviously you should attempt to resolve this by removing the old printer drivers, and installing the latest compatible drivers from the manufacturers website. However sometimes that simply is not possible. I therefore decided to write a shortlist of my personal “let’s try to…”  commands, in the hopes of helping someone in a similar situation.

Restarting the print spooler

Now, usually the first you one tries is restarting the Print spooler. This can easily be done from the services.msc snap-in, but I find that’s it’s a good idea to be a bit more thorough. Therefore I usually also stop the TCP/IP NetBIOS Helper service and delete any pending jobs in %windir%\System32\Spool\Printers\.

Using a batch script it can be done as follows:

The batch job above should be fairly straight forward. First the two services are stopped. Then a small pause (good practice…well, I like it anyway). Then I delete everything from %windir%\System32\Spool\Printers\, which contains pending print jobs. Then I start the services again.

Uninstalling network printers from the commandline

Sometimes useful when you want to remove a specific printer from one or more machines, as this method allows both uninstalling local and network printers.

The command /dn defines that you want to delete the printer and /n allows you to specify the printer via it’s hostname. Same thing when installing. The /in option tells it to install and, once again, /n lets you define the printer via it’s name.

For a full list of command line options when using printUI, simply run:

It works on most Windows versions.

Using WMIC to uninstall printers

Using the Windows Management Instrumentation Command-line / Console provides us with the cool features when uninstalling printers.

Uninstalling all Network printers

Obviously you can do the reverse as well, where you remove all local printers but non of the networked ones

One important note. Turns out that this only removes printers installed as network printer – It DOES NOT remove printers which are network printers, but are installed via a local TCP IP port. To remove these you need to specify them separately. This could be done as such:

Which will remove (delete) all TCP printers using an IP.

You may also like

Leave a Comment