Welcome to WinForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

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

 
   Windows XP Arc2 (Home) -> Print & Fax RSS
Next:  double window file  
Author Message
ejmichaud

External


Since: Oct 27, 2006
Posts: 3



(Msg. 1) Posted: Fri Oct 27, 2006 7:58 am
Post subject: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers
Archived from groups: microsoft>public>windowsxp>print_fax (more info?)

I have been using prndrvr.vbs and prnmgr.vbs to automate the
installation of any one of the hundreds of printers in our
organization. However recently I have been unable to use prndrvr.vbs
to install new HP print drivers.

Here is a typical command line that works fine to add a driver:
cscript c:\test\prndrvr.vbs -a -h "C:\Test\4100" -i
c:\test\4100\hp4100p5.inf -m "HP LaserJet 4100 PCL 5e"

HP's new drivers have a different .inf format and when I use the same
command line to install those new format drivers, I receive an error.
Here is a typical command line that would throw an error:
cscript c:\test\prndrvr.vbs -a -h "C:\Test\3800" -i
c:\test\3800\hp3800b.inf -m "HP Color LaserJet 3800 PCL 6"

The error I receive is as follows:
Unable to add printer driver HP LaserJet 3800 PCL 6 Win32 error code 2

With debug turned on:
Debug: In function ParseCommandLine
Debug: In function AddDriver
Unable to add printer driver HP Color LaserJet 3800 PCL 6 Win32 error
code 2

What do I mean by new format driver? Well, without posting the whole
driver .inf here is an example of a driver's .inf [Strings] section
that works fine:
[Strings]
Printer1="HP LaserJet 4100 PCL 5e"
DiskID1="HP LaserJet 4100 PCL 5e Disk 1"
DiskID2="HP LaserJet 4100 PCL 5e Disk 2"
DiskID3="HP LaserJet 4100 PCL 5e Disk 3"
HPDC_MONITOR="HP Master Monitor,HPBMMON.DLL"

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"

Any HP driver that has a driver who's .inf [Strings] section looks
similar to the first posting works fine. Any HP driver that has a
driver who's .inf [Strings] section looks similar to the second posting
failes with the "Win32 error code 2" error.

Anyone have any ideas? Anyone else run into this problem?

Eric

 >> Stay informed about: Win32 error code 2 when using prndrvr.vbs with latest HP P.. 
Back to top
Login to vote
ejmichaud

External


Since: Oct 27, 2006
Posts: 3



(Msg. 2) Posted: Tue Oct 31, 2006 8:45 am
Post subject: Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alan I appreciate your assistance and information regarding this
problem I am having. I am curious if you are able to install this
print driver using prndrvr.vbs?

Thanks
Eric

 >> Stay informed about: Win32 error code 2 when using prndrvr.vbs with latest HP P.. 
Back to top
Login to vote
ejmichaud

External


Since: Oct 27, 2006
Posts: 3



(Msg. 3) Posted: Tue Oct 31, 2006 6:27 pm
Post subject: Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I had actually already gone down that road and found as you found that
the rundll32 printui.dll (with /ia switch) does work for this driver.
I modified my scripts to use this instead of using prndrvr.vbs. Oddly
however, for this driver I cannot use the /q switch for quiet. The
switch works with all the other drivers except the drivers that have
this different type of .inf file format. It appears that HP is now
doing something odd in their print drivers that obviously meets the
standards however causes issues with prndrvr.vbs as well as rundll32
printui.dll. For what ever reason, HP's (what I call new .inf file
format) appears to now be being used in many of the new device drivers
they are releasing.

I am just happy I was able to find a work around. It would be great if
you could pass this information along to those who can correct the
problem, but I guess that would be under the assumption that either of
these options will work under future versions of Windows.

I didn't try extracting the cab files. I do have a workaround so I am
going to go with that.

Thanks for you assistance.
Eric Michaud
 >> Stay informed about: Win32 error code 2 when using prndrvr.vbs with latest HP P.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
general error - I just bought Epson R320 and have printed couple photos. Suddenly notice appears on the printer display even when it is not connected to the computer. General Error See your printer documentation for information about clearing the error. I have checked..

AddPrinterDriver error - I tried to install couples of different Fax related software to my PC such as FaxTalk Pro, WinFax Pro and FaxTools. Everytime it has Add Printer Driver problems. I already checked that the framedyn.dll is OK. Can anyone let me know how do I solve the....

Printer Spooler Error - i get an error message that says that the spooler is diabled or has no devices associated with it i am trying to reinstall my printer (HP PSC1350 all-in-one) after i did a sytem restore ..... I NEED HELP, i am about to trow everything away and start..

Network printing error - I hope someone can help. The Microsoft user forums didn't come up with anything. I have a computer running Win XP Home Edition. I have a home network with 2 hard-wired and 1 wireless workstation. We all use a printer on the wireless workstation. It's an....

System error with HP3320 - I frequently get the message: "This document cannot be printed due to a system error. Try printing again. If unsuccessful restart Windows and try again" Sometimes it will print the document a few times (not necessarily all on one day) and t...
   Windows XP Arc2 (Home) -> Print & Fax All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
 Windows XP
 Windows Vista!
 Win 2000/NT/98/ME


[ Contact us | Terms of Service/Privacy Policy ]