Microsoft Windows Experts

Windows cannot connect to the printer. Operation failed with error 0x0000007e October 9, 2011

Recently we started experiencing a strange issue with connecting to printers on Windows-7 x64 based client boxes, we were getting the following error every time we try to connect a printer:

Windows cannot connect to the printer.

Operation failed with error 0x0000007e.

So, 64-bit Windows 7 installed, we checked all was okay. Oops… x64 windows needs x64 printer drivers. 64-bit drivers added to the Server 2003 x86 based Print server, the client machines would download the driver (we were using the HP Universal print driver PCL 6) but then fail with the following error when trying to connect to the printer:

Windows cannot connect to the printer.

Operation failed with error 0x0000007e.

So we tried PCL5. No luck. None of the HP drivers would work. Googling the error showed lots of people in the same position – with 64-bit Windows Vista or Windows 7 and a 32-bit print server. The only suggested workaround is to add the printer manually to a workstation as a local printer, and picking up the driver from a CD or download that way (not from the print server).

So… in comes Process Monitor. Not long before the dreaded error message, spoolsv.exe looks in a registry key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\[SERVERNAME]\Printers\{0000-guid-of-printer-00}\CopyFiles\BIDI\Module that tells it to go find (system32) spool\DRIVERS\W32X86\3\hpcpn081.dll. This doesn’t exist, hence the ‘module not found’ error 7e. The driver installation does, interestingly, copy a newer hpcpn104.dll into this directory. Getting warmer!

Copying hpcpn081.dll from \\PRINTSERVER\print$\x64\3 to c:\windows\system32\spool\drivers\w32x86\3… printer installs successfully! So, why is it copying the wrong dll? Well, a short dig through the server’s registry reveals a key similar to the one on the client, in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\[PRINTERNAME]\CopyFiles\BIDI. The “Module” value points to spool\DRIVERS\W32X86\3\hpcpn104.dll. Change this to hpcpn081.dll and hey presto, all is fixed.

No having to deploy drivers to all machines or send the desktop teams round… just tweak this value for each of your stubborn printers!

Just go to your print server and change

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\[PRINTERNAME]\CopyFiles\BIDI\Module

from hpcpn104.dll to hpcpn081.dll

Hope it helps…



4 Responses to “Windows cannot connect to the printer. Operation failed with error 0x0000007e”

  1. Adam Says:

    Hey, just wondering if you would be willing to give me a hand with this issue. I’ve followed your post and am not sure how to tell which of the drivers is doing what and going where. I have ProcMon screenshots and registry screenshots if that helps.

    I’d appreciate some advice on this, How can I contact you?


  2. Michael Says:

    Thank you, shedding some light on this, its been a growing issue for me.

  3. Rick Says:

    I’m having that EXACT same issue, only I’m running Win7 enterprise IN 32 BIT MODE. (64 bit is not authorized for us). Everything else in your description remains the same, exept that I am not allowed to load printers as “local devices”. When I try to do so anyway, they seem to work, until you try to print to it, then it errors out 100% of the time. So, obviously this issue is not 64 bit to 32 bit dependent. There’s something else awry here… Any suggestions would be greatly appreciated.

  4. Heather Says:

    While changing to hpcpn081.dll didn’t work for us, I did some digging and found that we had hpcpn083.dll in C:\WINDOWS\system32\spool\drivers\w32x86\3. Updated it in the registry and BINGO, able to install the printer. Thanks for the help!!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s