Microsoft Fixit for Printing

Microsoft Fixit for Printing

  • Comments 47
  • Likes

Good morning AskPerf world!  Jeff Hagler from the Performance team here to chat about printing.  How many of you have ever dealt with an issue where you just knew that something was wrong with your print spooler but could not quite put a finger on it?  Maybe print jobs were slow, certain users could print to some printers but not others, or maybe nobody could print at all?

Back in the day, we included a tool with the Windows 2003 Resource Kit called Cleanspl that was able to make sure that the spooler service was configured correctly and clear of any third party dependencies that may be referencing bad/missing files.  Cleanspl is a great tool, but by being hidden in the resource kit, it was rarely used.  Up until now, this tool did not exist/work in recent Operating Systems like Windows Server 2008..

We are happy to announce the same functionality in Cleanspl (and a bit more) has been built into one of our Fixits that will run on Windows XP/2003 and Windows Vista/2008 and can be downloaded from Fixit 9662904.

*UPDATE* As of today (4/24/2013), the Fixit for Windows 7 and Windows Server 2008 R2 is now available!

Direct link to Print Reset Full Mode - http://go.microsoft.com/?linkid=9829711
Direct Link to Print Reset Lite Mode - http://go.microsoft.com/?linkid=9829710

Related KB Article:

You experience Print Spooler error messages after installing or upgrading a Third-Party print driver
http://support.microsoft.com/kb/2793718

Please Note:  All applications must be shut down before running the Fix It Solution.  Some applications will open a handle to the print spooler when running and this will prevent any cleanup from occurring.  The Fix It Solution will not shut down any applications before the cleanup to prevent loss of data.

This Fixit package consists of two modes: Light and FullLight will make changes to the spooler that should not require your end user to make any changes, while the Full mode will restore the print spooler to defaults and will require a complete reinstall of your print drivers and printers.  Think of the Light version as something you can run on any system (print server, terminal server, normal client system) as a first troubleshooting step, and the Full version as something to reserve for systems that get their printers and print drivers pushed down from Print Servers (via Group Policy and Point and Print).  Let’s cover the key part of the previous statement again for Fixit 9662904 – do not run the Full version on a Print Server as it will delete all the printers.  Basically, it puts your Print Environment back to the way it was when the OS was installed.

When you first run the Fixit on your system, you will be prompted with the normal installation/licensing agreement screens.  You will then receive the dialog box below.  To run the Light version, just click Next.  To run the Full version, you will need to check the box to “Reset the print spooler to defaults”.

Note the Light version does not require a reboot but the Full version does.  Again, do not run the Full version Fixit 9662904 on a Print Server as it will delete all the print drivers and print queues

clip_image001

Here are the details on what actually happens during each of these cleanups:

Light Mode

  • Set the print spooler service back to its defaults (automatically start, run as Local System, etc.)
  • Remove any dependencies that the spooler may have on 3rd party services
  • Delete any print jobs from %windir%\system32\spool\printers (shd and spl files)
  • Turn on logging of print errors and warning to the event log (Printers -> File -> Server Properties -> Advanced Tab -> “Log spooler error events” and “Log spooler warning Events” will be checked)
  • Make sure the standard print monitors are present (USB, Local Port, and TCPIP) under [HKLM\CurrentControlSet\Control\Print\Monitors] (and WSD on 2008/Vista only)
  • Ensure that the winprint print processor is present for the architecture of the computer – for example: [HKLM\CurrentControlSet\Control\Print\Environments\Windows x64\Print Processors\winprint]
  • Start the print spooler service
  • If any of the core print spooler binaries are missing (spoolsv.exe, spoolss.dll, localspl.dll, win32spl.dll), the package attempts to copy that file from dllcache - if they aren’t present in dllcachce, we log that in the desktop log file
  • If ntprint.inf is missing, we log that to the desktop log file
  • If there is a bogus path for the spool directory DefaultSpoolDirectory under [HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers], we log that information to the desktop log file

Full Mode

  • Does all of the Light steps first
  • Delete *.spl and *.shd files from a non-default spool folder
  • Delete *.spl and *.shd files from the default spool folder:  %windir%\System32\spool\printers
  • Delete printer shares
  • Delete per-machine printers from [HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers] (except on Vista do not delete "Microsoft XPS Document Writer" and “Fax”)
  • Delete per-machine connections from [HKLM\SYSTEM\CurrentControlSet\Control\Print\Connections] and the “Connections” key itself
  • Delete per-user connections under <USER HIVE>\Printers
  • Delete Monitors under [HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors] (except Local Port)
  • Delete each driver under [HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows <arch>\Drivers\Version-3] (except on Vista don’t delete “Microsoft XPS Document Writer” and “Microsoft Shared Fax Driver”)
  • Vista: delete all files under “%windir%\System32\spool\drivers\<arch>\3” except for driver files associated with “Microsoft XPS Document Writer” and “Microsoft Shared Fax Driver”.  Ignore subdirectories.
  • XP: delete the “%windir%\System32\spool\drivers” folder
  • Set back the defaults : [HKLM\SYSTEM\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers] (AddPrinterDrivers=0)
  • Delete [HKLM\SYSTEM\CurrentControlSet\Control\Print\Providers\Internet Print Provider\Ports]
  • Add back these default values:
    • HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\USB Monitor
    • HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port
    • (XP) HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\BJ Language Monitor
    • (XP) HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\PJL Language Monitor
    • (Vista) HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\WSD Port
    • (If Fax driver was installed) HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\Microsoft Shared Fax Monitor

As you can see the light mode of this tool is a great first pass at troubleshooting a myriad of Print Spooler issues, with minimal risk/downtime for your users.  Give it a go and let us know how it works for you.

-Jeff Hagler

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Great!!!

    Looking forward to Server 2008 R2 version :-)

  • Fantastic post.

    In the Spanish Technet forums (Terminal Services) has published a review of this article. (social.technet.microsoft.com/.../4c95479f-a7fe-43c6-859a-6ebe36ffaf48) Given the problems encountered by users with the Print Spooler in TS environments, is a good tool to narrow the problem. Pending the WS2008R2 version, thank you very much for your work.

  • I have a traditional chinese windows 7 x64 system with 5 printers  installed with 5 different user forms installed and assigned as default each (actually they all point to the same usb printer lq690c.).It happens some times the spooler lost all the user defined forms and all the chinese-named forms.But it can be fixed some times by restart the spooler,Unfortunately it failed some times.Can you give me any idea?

    Thanks.

  • When are we going to see the R2 version? Desperately needing it..

    Thanks

  • September, still nothing for Win 7?

  • Any news on the Windows 7/2008 R2 version?

  • Windows 7 version would be awesome.  Any news as to when we will see it?  It's been more than year.

  • @Some IT Guy:  I have been told it's in the final stages of approval and should be ready in ~2 weeks.  I will update this blog when it is available.  Thanks for your patience!

  • Great news!  Thanks!

  • Is there an equivalent tool (like we have adplus.vbs in Win 2003) to troubleshoot print spooler crash in 2008 R2?

  • hotfix to improve restore performance using Printbrm.exe on Win 2008 R2 / Win 7

    support.microsoft.com/.../2752259    

    Consider the following scenario:

    You create several print queues on a computer that is running Windows 7 or Windows Server 2008 R2. For example, you create more than 500 print queues on the computer.

    You use the Printbrm.exe command-line tool to back up the print queues on the computer.

    You restore the backup by using the Printbrm.exe command-line tool.

    In this scenario, the time that is required to restore the backup is longer than expected.

  • @Blake Morrison -MSFT, Hope you are doing fine.

    Thanks to Microsoft Chaps in advance for releasing the Microsoft fixit tool ( Win 2008 R2 version ). !!

  • @Windows AD:  Thanks for your comments.  For a similar adplus.vbs tool, I would recommend PROCDUMP.exe.  You can find it via bing search.  Your syntax will be something like this:  "procdump -accepteula -ma -e spoolsv.exe"

  • @Blake Morrison -MSFT, Many thanks for your prompt response.

    The tool ( procdump ) is awesome. Thanks again.

    Eagerly awaiting for the release of cleanspool.exe tool ( Win 2008 R2 version ) !!!! Hope tool will be available this weekend or next weekend ..

  • @Blake Morrison -MSFT,

    Have the new tool cleanspool.exe for ( Win 2008 R2 version ) been released?

    Kindly request you to share the link to download the tool, if it has already been released. Eagerly looking for the tool. Many thanks for your support !!!