|
| |||||||||
| Tags: command line, hp laserjet, printer |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Adding a printer/port Commandline - Auto installing printers/portd Adding a printer/port Commandline - Auto installing printers/portd and here is my command. Cscript C:\WINNT\System32\prndrvr.vbs -a -m "HP LaserJet M4345 MFP PCL 5" -v 3 -e "Windows NT x86" -h "C:\INF" -i "hpcm434b.inf" error code 87 on the above Yes drivers are in C:\INF I have tried C:\\INF returns error 87 and -h "C:\\INF" -i "C:\\INF\\hpcm434b.inf" returns error -536870353 or -h "C:\INF" -i "C:\INF\hpcm434b.inf" returns error -536870353 as far as I can tell the name in the inf is "HP LaserJet M4345 MFP PCL 5" Below is part of the inf called hpcm434b.inf [HP] "HP LaserJet M4345 MFP PCL 5" = HPCm4345.GPD,USBPRINT\Hewlett-PackardHP_La619B,USBPRINT\VID_03F0&PID_7417&Rev_01 00&PRINT_HPZ,DOT4PRT\Hewlett-PackardHP_La619B,DOT4PRT\Hewlett-PackardHP_La619B&PRINT_HPZ,DOT4PRT\Hewlett-PackardHP_La619B&DOT4&PRINT_HPZ,DOT4PRT\VID_03F0&P ID_7417&REV_0100,DOT4PRT\VID_03F0&PID_7417,DOT4PRT \VID_03F0&PID_7417&REV_0100&PRINT_HPZ,DOT4PRT\VID_ 03F0&PID_7417&PRINT_HPZ,DOT4PRT\VID_03F0&PID_7417& REV_0100&DOT4&PRINT_HPZ,DOT4PRT\VID_03F0&PID_7417& DOT4&PRINT_HPZ [HP.NT.6.0] "HP LaserJet M4345 MFP PCL 5" = HPCm4345.GPD.NT.6.0,USBPRINT\Hewlett-PackardHP_La619B "HP LaserJet M4345 MFP PCL 5" = HPCm4345.GPD.NT.6.0,USBPRINT\VID_03F0&PID_7417&Rev _0100&PRINT_HPZ "HP LaserJet M4345 MFP PCL 5" = hpcm4345.GPD.NT.6.0,DOT4PRT\Hewlett-PackardHP_La619B "HP LaserJet M4345 MFP PCL 5" = hpcm4345.GPD.NT.6.0,DOT4PRT\Hewlett-PackardHP_La619B&PRINT_HPZ "HP LaserJet M4345 MFP PCL 5" = hpcm4345.GPD.NT.6.0,DOT4PRT\VID_03F0&PID_7417 "HP LaserJet M4345 MFP PCL 5" = hpcm4345.GPD.NT.6.0,DOT4PRT\VID_03F0&PID_7417&DOT4 &PRINT_HPZ "HP LaserJet M4345 MFP PCL 5" = hpcm4345.GPD.NT.6.0,DOT4PRT\VID_03F0&PID_7417&REV_ 0100 "HP LaserJet M4345 MFP PCL 5" = hpcm4345.GPD.NT.6.0,DOT4PRT\VID_03F0&PID_7417&REV_ 0100&DOT4&PRINT_HPZ ; OEM URLS ; ; This sections gives the URL for manufacturers found in the Manufacturers section [OEM URLS] %HP% = "http://go.microsoft.com/fwlink/?LinkID=37&prd=10798&sbp=Printers" I am at a lost ..thanks for any help , John PS. I do only need the inf located in my "INF" dir and not the cpmplete HP install dir . I did try that but still no luck. |
|
#2
| |||
| |||
|
so I found p5i2enww.cab and extraced (unidrvui.dll,unires.dll,unidrv.hlp) and placed them in C:\INF. with this Cscript %WINDIR%\System32\prndrvr.vbs -a -m "HP LaserJet M4345 MFP PCL 5" -v 3 -e "Windows NT x86" -h C:\INF -i C:\INF\hpcm434b.inf returned error -536870353 then I tried this Cscript C:\WINNT\System32\prndrvr.vbs -a -m "HP LaserJet M4345 MFP PCL 5" -v 3 -e "Windows NT x86" -h C:\INF -i C:\INF\hpcm434b.inf returned error -536870353 I forg to to mention that the person who builds our XP image changed it too WINNT for legacy aps. this works like a champ for adding the port Cscript C:\WINNT\System32\Prnport.vbs -a -r IP_1 -h 165.245.192.245 -o raw I can manually install the driver with the GUI by pointing to it with the "have a disk Option " and it listed it as digitally assigned and installed it fine. Now I did need to add some files but then it installed ok and printed. I then add those files I need to the INF dir and tried Cscript C:\WINNT\System32\prndrvr.vbs -a -m "HP LaserJet M4345 MFP PCL 5" -v 3 -e "Windows NT x86" -h C:\INF -i C:\INF\hpcm434b.inf returned erorr code -536870353 Cscript C:\WINNT\System32\prndrvr.vbs -a -m "HP LaserJet M4345 MFP PCL 5" -v 3 -e "Windows NT x86" -h C:\INF -i hpcm434b.inf returned error code 87 tried pcl 6 Cscript C:\WINNT\System32\prndrvr.vbs -a -m "HP LaserJet 4345 mfp PCL 6" -v 3 -e "Windows NT x86" -h C:\INF\HP4345PCL6 -i C:\INF\HP4345PCL6\hpc4345c.inf returned error code 2 expaneding the cab file worked ...sorry I forgot that one. Now the do you see where I may be off here .. Cscript C:\WINNT\System32\prnmngr.vbs -a -m "HP LaserJet 4345 mfp PCL 6" -r IP_165.245.192.245 -p "HP LaserJet 4345 mfp PCL 6" returns error specified port unknow... WIN32 error code 1796 here is the whole comand @ECHO OFF :START MKDIR C:\INF XCOPY \\nkcmapps\vol1\desktoptools\DRIVERS\PRINTERS\INF "C:\INF" /Y /H /Q /E Cscript C:\WINNT\System32\Prnport.vbs -a -r IP_1 -h 165.245.192.245 -o raw Cscript C:\WINNT\System32\prndrvr.vbs -a -m "HP LaserJet 4345 mfp PCL 6" -v 3 -e "Windows NT x86" -h C:\INF\HP4345PCL6 -i C:\INF\HP4345PCL6\hpc4345c.inf Cscript C:\WINNT\System32\prnmngr.vbs -a -m "HP LaserJet 4345 mfp PCL 6" -r IP_165.245.192.245 -p "HP LaserJet 4345 mfp PCL 6" |
|
#3
| |||
| |||
| Re: Adding a printer/port Commandline - Auto installing printers/portd
No need for "" around the path parameter the help file was updated in Server 2003 Remarks: The inf file name must be fully qualified. If the inf name is not specified, the script uses the ntprint.inf file in the inf subdirectory of the Windows directory. If the driver path is not specified, the script searches for driver files in the driver.cab file. that said you still will not get the driver installed until you locate the correct language cab and extract the files to the c:\inf directory or you will get error 2 file not found. I have the PCL 6 and it's a different version so the file names are different but look for the one with en in the name if you need English. The PCL 6 version is p6i2enww.cab. Thanks to Eric Michaud for figuring this HP issue out 3 years ago. He was using German which is the de version of the file. C:\INF>Cscript %WINDIR%\System32\prndrvr.vbs -a -m "HP LaserJet M4345 MFP PCL 6" -v 3 -e "Windows NT x86" -h C:\INF -i C:\INF\hpcm434c.inf Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Unable to add printer driver HP LaserJet M4345 MFP PCL 6 Win32 error code 2 after extracting the English files C:\INF>Cscript %WINDIR%\System32\prndrvr.vbs -a -m "HP LaserJet M4345 MFP PCL 6" -v 3 -e "Windows NT x86" -h C:\INF -i C:\INF\hpcm434c.inf Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Added printer driver HP LaserJet M4345 MFP PCL 6 |
|
#4
| |||
| |||
| Re: Adding a printer/port Commandline - Auto installing printers/portd
I'll assume there have not been any changes to the inf file that would break the digital signature. Verify that the print driver can be installed without any signature warning and that the add driver wizard states the driver is signed when using the UI (be sure to enable the signature warnings if you disabled them). WMI cannot be used to install unsigned drivers. If you installed .NET 3.5 SP1 there was a unidrv file that caused any other drivers to throw a warning and this will also affect the ability to install drivers using WMI. There is a download to add the signature to the machine. |
|
#5
| |||
| |||
| Re: Adding a printer/port Commandline - Auto installing printers/portd
did you try the PCL 6 version of the driver or download the most recent PCL 5 version? your second example with error 87 is expected since you are passing in invalid information in the -i parameter. |
|
#6
| |||
| |||
| Re: Adding a printer/port Commandline - Auto installing printers/portd
I will assume you extracted the necessary files from the cabs and placed them in C:\INF\HP4345PCL6. Have you attempted this using a flat file set (all binaries expanded)? Give it a shot at least. |
|
#7
| |||
| |||
| Re: Adding a printer/port Commandline - Auto installing printers/portd
The port name you are adding is not the port name you are assigning the printer -r IP_1 in prnport.vbs -r IP_165.245.192.245 in prnmngr.vbs |
|
#8
| |||
| |||
| Re: Adding a printer/port Commandline - Auto installing printers/portd
Score . Thanks Alan for all your help.. For future reference here is the whole comand . @ECHO OFF :START MKDIR C:\INF XCOPY \\nkcmapps\vol1\desktoptools\DRIVERS\PRINTERS\INF "C:\INF" /Y /H /Q /E Cscript C:\WINNT\System32\Prnport.vbs -a -r IP_165.245.192.245 -h 165.245.192.245 -o raw Cscript C:\WINNT\System32\prndrvr.vbs -a -m "HP LaserJet 4345 mfp PCL 6" -v 3 -e "Windows NT x86" -h C:\INF\HP4345PCL6 -i C:\INF\HP4345PCL6\hpc4345c.inf Cscript C:\WINNT\System32\prnmngr.vbs -a -m "HP LaserJet 4345 mfp PCL 6" -r IP_165.245.192.245 -p "HP LaserJet 4345 mfp PCL 6" |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Adding a printer/port Commandline - Auto installing printers/portd" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script to Install Printer Drivers w/o adding printer | witecoko | XP Print Fax | 5 | 03-02-2009 11:41 PM |
| Script to Install Printer Drivers w/o adding printer | witecoko | XP Print Fax | 0 | 27-01-2009 03:08 AM |
| XP desktop printer networked to VISTA laptop - adding printer error | Patrycja | Vista Print and Fax | 1 | 19-04-2008 05:04 PM |
| adding tcp/ip printer ports and installing printers on windows 200 | thebucs | Server Scripting | 4 | 09-06-2006 08:45 AM |
| Adding a printer/port Commandline - Auto installing printers/portd | Fiji Smithy | XP Print Fax | 5 | 31-01-2006 12:07 PM |