For a while now, I’ve been noticing that my Windows printer list would come up empty in the control panel, or when I tried to print something, I’d get an error that indicates that the Print Spooler service is not running. Going and manually starting the Print Spooler service fixes the problem, but that’s silly, why should I have to do it? Why is the Print Spooler service stopping at all?
Well, the cheesiest way to fix this problem is to set the Print Spooler service to automatically after failure. Visit the Print Spooler service properties in the Services module in the MMC and click on the “Recovery” tab. I found the default settings to be “Restart the Service” for first and second failures, but not for subsequent failures. Set all three of the options to “Restart the Service.”

Alright… problem solved.
Except the Print Spooler service is still crashing, as I can see in the reliability monitor:

What’s this? Some of these crashes are 10 minutes apart or less? Even though the Print Spooler restart every time it crashes, I’d like to get rid of the crashes altogether.
Looking at the system event logs, I found error messages that correspond to the service crash times that look like this:
Faulting application name: spoolsv.exe, version: 6.1.7600.16385, time stamp: 0x4a5bd3d1
Faulting module name: wsdapi.dll, version: 6.1.7600.16385, time stamp: 0x4a5be0a1
Exception code: 0xc0000005
Fault offset: 0x000000000000769a
Faulting process id: 0×1340
Faulting application start time: 0x01cb3e447c97686a
Faulting application path: C:\Windows\System32\spoolsv.exe
Faulting module path: C:\Windows\System32\wsdapi.dll
Report Id: d1e7f7eb-aa38-11df-b6ff-caee131491bf
Ah ha! wsdapi.dll is blamed for crashing the Print Spooler service. Some research indicates that this DLL is used to talk to printers configured to print via WSD, or Web Services for Devices.
Turns out that we have a couple of printers at the office where I work that support WSD, and Windows 7 had automatically chosen WSD when I set them up using the printer setup wizard. By the way, you can check to see if you have any printers set up to use WSD by opening Print Management (find it using the Start Menu search), and then clicking on Print Servers -> (your computer) -> Ports. Any WSD ports will have a name starting with “WSD.”
Now, I don’t know if this crash is because of Microsoft’s WSD support, or flaky printer drivers, or a flaky WSD implementation on the printer itself, or what. All of the print drivers I am using are either the ones bundled with Windows 7 or ones provided automatically by Windows Update, though. Anyway, I decided to delete the WSD printers and set them up again using plain old TCP/IP printing without WSD, to see if that cured the problem. Sure enough, it did. Here’s how it goes.
In the printer setup wizard, after telling it you want to search for a network printer, make sure you choose the option that says your printer was not listed (even if it was).

Then say you want to add a printer by its IP address.

Then set the device type to “TCP/IP Device” instead of “Autodetect” or “WSD”…

And then, type in the IP address.

Then complete the printer setup as normal and repeat for any other WSD printers that you have. If you got them all, no more crashes due to WSD!
Update: September 17, 2010
Barnkeeper below in the comments suggests that this is related to security issue MS10-061 (corrected by update KB2347290). I have tested this and confirmed that the update does not fix the problem. The Print Spooler service continues to crash even with the update applied.
Update: February 3, 2011
This issue still occurs in Windows 7 Service Pack 1.
It does seem an odd choice by HP to use these ports by default now, we’ve had numerous problems with them, and always switch to standard IP. WSD ports=more helpdesk calls.
Seems to be a case of HP changing a proper mature technology for something really flaky just for the hell of it.
Next they’ll be replacing all their mature & sensible range of screens with horrible black shiny cheap ones with external psu’s…… oh hang on…
Awesome, exactly what I needed to resolve problem for client. Wish all fixes were typed out this completely. Thanks.
Thank you!
I just had this pop up on my 2008 R2 print server, and changing the 2 printers to tcp/ip and removing wsd ports fixed the issue.
Kudos to OP.
You’re a lifesaver, this bug was driving me (and my users) nuts, was starting to lose faith in Windows 7!
Thanks. Am on way to fixing printer problem–this was part of it. Never would have been able to figure this part out, so thank you very very much. Never installed printer this way but seem to have peculiar problems arise after Microsoft updates?
You rock – thanks (now why couldn’t MS said that).
[...] findet sich eine Forendiskussion, wo ein WSD-Gerät das Standby verhindert. Ein Blogbeitrag unter [7] diskutiert, wie ein WSD-Druckertreiber den Druck-Spooler zum Absturz bringt. Unter [8] findet sich [...]
Windows Server 2008 R2 Datacenter Service Pack 1 RTM:
Confirmed still crashing when using WSD to connect to printers.
On our Windows Print services we had numerous issues with WSD auto detecting printers and becomng unstable or unable to print. One solution we found was to disable WSD service on all new network printers deployed.
Surely there’s a way to reserve an IP address for a particular device (based on its physical address), for situations like this. If there’s not, you can always manually assign an IP address to your printer(s) (taking care to place it outside of the DHCP pool).
I came up with this fix a while ago for my wireless printers at work…the only problem that I have now, is that I recently deployed a new server that acts as the DHCP server, and I’m not sure if theres a a way to control DHCP reservation on SBS 2008. Otherwise the IP address of the printer could change everytime the DHCP lease renews.
Nice work, thanks. However, I wonder why this problem occurs only on some machines and not on others which use the same printers? The best solution would be to find the source of the problem, alas, I tried in vain…
I’m not convinced that the bug I described in this post is related to that security vulnerability. The bug occurred on a closed network and I’m quite sure that there was no malicious software around. In any case, I have installed the update, so I will re-test WSD to see if the issue is fixed and update this post with the results.
BELOW IS THE EXPLANATION OF THE ISSUE AND THE SECURITY UPDATE THAT FIXES THE PROBLEMS WITH “PRINT SPOOLER SERVICES” NOT WORKING.
http://www.microsoft.com/technet/security/bulletin/MS10-061.mspx
Sure. Both of the printers you see in the screenshot above support WSD, an HP OfficeJet 6500 and a Lexmark E260dn.
Hi Aaron,
I am searching for a WSD printers to use on a demo for my PhD
So far, printer manufacturers are not giving me any garanty that the printer I will buy is a WSD capable.
I see that you used WSD at work, can you please give me printer name or model you used which supports WSD technology.
Thanks and Regards,
Charbel