Experiencing 100% CPU periodically? Installed an HP printer recently?

Talking about printer drivers is certainly somewhat off-topic on development blog, but as every developer uses a printer I thought this article to be possibly helpful …

I am a long time fan of Hewlett Packard (HP) printers. My oldest one, an HP 4L is about 16 years old and refuses to break. I have several other HP printers, all producing excellent printouts. Everytime I had to deal with other brands, they broke early or had hardware weaknesses I didn’t like.

There is and was one point though: HP’s driver installation just sucks. I believe the HP 4l’s installation was fine, it did was it was supposed to do: install a working driver. Most others come with a CD, which auto-runs a setup which installs tons of things I don’t want and don’t need.

So when connecting to an HP printer, I am usually careful:

  • don’t run the main setup exe
  • just add the printer to Windows and use the “have disk” option
  • make sure it does not attempt to run any “external” stuff

Last week I got a new HP OfficeJet. Nice piece of hardware. Fast and even has separate ink containers for each color. So far so good. For some reason I did not follow my own rules above and let setup.exe run :-(

So guess what, a little later my CPU started to go to 100% CPU for minutes periodically (actually 50%, as I have a dual core). Unfortunately it’s not easy to find out what’s actually causing the reason of this 100%  CPU situation. Windows Task-Manager just says it’s one of the various svchost.exe processes – which can be each and everything.

Using SysInternals Process Explorer I was able to track it down to wbemcore.dll. This is still not an HP file, but an DLL of Window’s WMI subsystem. For information about WMI see Wikipedia’s article. Searching on Google shows many reports of this from HP printer users …

My first attempt was to run the HP un-installer routine, and I deleted all HP releted dlls from system32. This did not help though.  After a few more Google searches I found Scott Hanselman’s blog about Rebuilding the WMI/WBEM Repository. That finally helped – I got my CPU back :)

For your convenience I’ve put the required rebuild steps into an easy to use batch file. Get that file below:

[download#1#size#nohits]

This file is provided “as is”. I take no responsibility for any damages. Use at your own risk. Always create a backup before modifying system files.

blog comments powered by Disqus
CodeGear Technology Partner