Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

Windows XP Support


Reply
 
Thread Tools Search this Thread
  #1  
Old 27-10-2006
Member
 
Join Date: May 2010
Posts: 65
Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

We have more than 100 printers running in our company. In order to automate the installation of any of the printers i use prndrvr.vbs and prnmgr.vbs. I was using this since years but since yesterday there seems to be some problem. I was trying to install a new HP Printer driver using the same prndrvr.vbs but it wont allow me to that anymore. I use to the run the following typical command line that works fine to add a driver:

Quote:
cscript c:\test\prndrvr.vbs -a -h "C:\Test\4100" -i
c:\test\4100\hp4100p5.inf -m "HP LaserJet 4100 PCL 5e"
I think this is because HP's new drivers have a different .inf format, hence i am getting the error message when trying to use the same command line. The error message says something like this: "Unable to add printer driver HP LaserJet 3800 PCL 6 Win32 error code 2"

When i run the debug, i get this result:
Quote:
Debug: In function ParseCommandLine
Debug: In function AddDriver
Unable to add printer driver HP Color LaserJet 3800 PCL 6 Win32 error code 2
Here is an example of a driver's .inf [Strings] section that doesn't work:
[Strings]
PrinterClassName="Printers"
DiskID="HP Color LaserJet 3800 PCL Printer Driver Disk"
PRINT_PROCESSOR="HPZPP41w,hpzpp41w.DLL"
HP="HP"
HP_Mombi_Driver_Name="HP Color LaserJet 3800 PCL 6"
HP_Wizard_Driver_Name="HP Color LaserJet 3800 PCL6"

Please help.

Reply With Quote
  #2  
Old 27-10-2006
Member
 
Join Date: Jan 2006
Posts: 605
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

As the error says "File Not Found", can you tell me if the files kept in c:\test\3800 or in subdirectories under this? Also did you tried using both driver names with the same failure?
Reply With Quote
  #3  
Old 30-10-2006
Member
 
Join Date: May 2010
Posts: 65
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

Thank you for the help. Yes, i have kept all driver files under C:\Test\3800 folder. When i try to install the driver manually using the UI, i dont get any problem and it gets installed without any problem. By using both driver names I am assuming you are referring to "HP Color LaserJet 3800 PCL 6" and "HP Color LaserJet 3800 PCL6". If I try the other, with the following command line, it gives me the following error message:

Quote:
I get the following error:
Debug: In function ParseCommandLine
Debug: In function AddDriver
Unable to add printer driver HP Color LaserJet 3800 PCL6 Win32 error code 87
So what now? Can anyone please help me out installing the HP Color LaserJet 3800 PCL6 driver using prndrvr.vbs? If you want you can see the HP drivers here.
Reply With Quote
  #4  
Old 01-11-2006
Member
 
Join Date: Sep 2005
Posts: 179
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

Hello Lopa, I will suggest you try out rundll32 printui.dll as a substitute and see what happens. I tried forwarding the info to one of the devs. prndrvr.vbs just invokes rundll32 interfaces. Also you should have tried expanding the 26 cabs in the package and attempt to install with a flat file share. See if it helps.

By the way i have seen many cases where this has worked:
G:\hp3800>rundll32 printui.dll,PrintUIEntry /if /b "Test Printer" /f
G:\hp3800\hpc3800c.inf /r "lpt1:" /m "HP Color LaserJet3800 PCL 6"
G:\hp3800>rundll32 printui.dll,PrintUIEntry /ia /K /m "HP Color LaserJet 3800 PCL 6" /h "Windows NT x86" /v 3 /f G:\hp3800\hpc3800c.inf

And this is what failed every time:
G:\hp3800>prndrvr -a -m "HP Color LaserJet 3800 PCL 6" -i
G:\hp3800\hpc3800c.inf -h G:\hp3800
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Unable to add printer driver HP Color LaserJet 3800 PCL 6 Win32 error code 2
Reply With Quote
  #5  
Old 01-11-2006
Member
 
Join Date: Sep 2004
Posts: 208
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

Well as far as i know the print scripts can only run without dialogs. This is why no unsigned drivers can be installed using prndrvr.vbs. Hope you got my point.
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers"
Thread Thread Starter Forum Replies Last Post
Using current XP Print drivers and Windows 7 Print drivers on 2003 Print Server Richcom Operating Systems 3 28-07-2010 10:19 PM
Error code while installing latest patch for joomla Mind It Software Development 3 29-10-2009 03:33 PM
Error code 87 when installing remote print drivers... MadKovalchuk17 Windows Server Help 2 29-01-2008 09:22 PM
Printers - Event ID 6161 - Win32 error - Print Processor error:13 Ringo Windows XP Support 3 17-11-2006 01:41 AM


All times are GMT +5.5. The time now is 02:34 AM.