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

Tags: , , ,

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

XP Print Fax


Reply
 
Thread Tools Search this Thread
  #1  
Old 27-10-2006
ejmichaud@hotmail.com
 
Posts: n/a
Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

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


Reply With Quote
  #2  
Old 27-10-2006
Alan Morris [MSFT]
 
Posts: n/a
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

error 2 is File Not Found.

Are all the files in c:\test\3800 or in subdirectories under this?

Did you attempt using both driver names with the same failure?

--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.

<ejmichaud@hotmail.com> wrote in message
news:1161961080.412615.210590@k70g2000cwa.googlegr oups.com...
>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
>




Reply With Quote
  #3  
Old 30-10-2006
ejmichaud@hotmail.com
 
Posts: n/a
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers


Alan Morris [MSFT] wrote:
> error 2 is File Not Found.
>
> Are all the files in c:\test\3800 or in subdirectories under this?
>
> Did you attempt using both driver names with the same failure?
>
> --
> Alan Morris
> Windows Printing Team
> Search the Microsoft Knowledge Base here:
> http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto
>
> This posting is provided "AS IS" with no warranties, and confers no rights.


Yes, all the driver files are in the C:\Test\3800 folder. If I install
the driver manually using the UI it installs without any issues.

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:
cscript c:\test\prndrvr.vbs -a -h "C:\Test\3800" -i
c:\test\3800\hp3800b.inf -m "HP Color LaserJet 3800 PCL6"

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

The big difference with receiving error code 87 and error code 2 is the
time in which the errors are received. An error code of 87 is received
as soon as the command is ran, where as the error code 2 takes about 10
seconds to return the error.

If on the command line I specify a .inf that doesn't exist, I receive
error code 87, if I specify a Driver name that doesn't exist in the
..inf I receive an error code 87. It appears to me that file not found,
or driver entry not found would result in an error code of 87.

I am curious, can anyone install the HP Color LaserJet 3800 PCL6 driver
using prndrvr.vbs? You can find the driver here:
http://h20000.www2.hp.com/bizsupport...tem=lj-35621-2


Reply With Quote
  #4  
Old 30-10-2006
Alan Morris [MSFT]
 
Posts: n/a
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

error 87 is invalid parameter.

--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.

<ejmichaud@hotmail.com> wrote in message
news:1162221609.416398.323630@h48g2000cwc.googlegr oups.com...
>
> Alan Morris [MSFT] wrote:
>> error 2 is File Not Found.
>>
>> Are all the files in c:\test\3800 or in subdirectories under this?
>>
>> Did you attempt using both driver names with the same failure?
>>
>> --
>> Alan Morris
>> Windows Printing Team
>> Search the Microsoft Knowledge Base here:
>> http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.

>
> Yes, all the driver files are in the C:\Test\3800 folder. If I install
> the driver manually using the UI it installs without any issues.
>
> 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:
> cscript c:\test\prndrvr.vbs -a -h "C:\Test\3800" -i
> c:\test\3800\hp3800b.inf -m "HP Color LaserJet 3800 PCL6"
>
> 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
>
> The big difference with receiving error code 87 and error code 2 is the
> time in which the errors are received. An error code of 87 is received
> as soon as the command is ran, where as the error code 2 takes about 10
> seconds to return the error.
>
> If on the command line I specify a .inf that doesn't exist, I receive
> error code 87, if I specify a Driver name that doesn't exist in the
> .inf I receive an error code 87. It appears to me that file not found,
> or driver entry not found would result in an error code of 87.
>
> I am curious, can anyone install the HP Color LaserJet 3800 PCL6 driver
> using prndrvr.vbs? You can find the driver here:
> http://h20000.www2.hp.com/bizsupport...tem=lj-35621-2
>




Reply With Quote
  #5  
Old 31-10-2006
ejmichaud@hotmail.com
 
Posts: n/a
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

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


Reply With Quote
  #6  
Old 01-11-2006
Alan Morris [MSFT]
 
Posts: n/a
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

No it fails with file not found. Can you substitute rundll32 printui.dll
for your scenario. I forwarded the info to one of the devs. prndrvr.vbs
just invokes rundll32 interfaces.

did you expand the 26 cabs in the package and attempt to install with a flat
file share?

this works
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


this fails

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

--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.

<ejmichaud@hotmail.com> wrote in message
news:1162313131.651610.131570@m7g2000cwm.googlegro ups.com...
> 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
>




Reply With Quote
  #7  
Old 01-11-2006
ejmichaud@hotmail.com
 
Posts: n/a
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

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


Reply With Quote
  #8  
Old 01-11-2006
Alan Morris [MSFT]
 
Posts: n/a
Re: Win32 error code 2 when using prndrvr.vbs with latest HP Print Drivers

the print scripts can only run without dialogs. This is one of the reasons
no unsigned drivers can be installed using prndrvr.vbs.



--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.

<ejmichaud@hotmail.com> wrote in message
news:1162348024.556691.216570@e64g2000cwd.googlegr oups.com...
>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
>




Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > XP Print Fax


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
Error code while installing latest patch for joomla Mind It Software Development 3 29-10-2009 03:33 PM
Win32 Error Code S H A R I Q U E XP Print Fax 2 09-08-2008 04:45 PM
Error code 87 when installing remote print drivers... MadKovalchuk17 Server Scripting 2 29-01-2008 09:22 PM
Additional Drivers x64 drivers on x86 Print server ntprint.inf MacAddict Windows x64 Edition 2 01-12-2007 09:28 AM
Printers - Event ID 6161 - Win32 error - Print Processor error:13 Marcel XP Print Fax 4 17-11-2006 01:41 AM


All times are GMT +5.5. The time now is 03:53 AM.