Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Unattended install of printer

- - - - -

  • Please log in to reply
4 replies to this topic




  • Member
  • 18 posts
Hi all,

Have spent a while researching how to install a ipp printer from the command line.

Here's the command I have at the moment.
rundll32 printui.dll,PrintUIEntry /b "Brother HL-1430" /x /n "Brother HL-1430" /if /f "\\adrafileserver\drivers\Brother HL-1430\Driver\pcl\Win2k_xp\ENGLISH\OEMHL01A.INF" /r "" /m "Brother HL-1430 series"

A window opens saying "Files Needed" and on the next line in that window it says "The file 'BROHL143.PPD' on Brother Laser Printer Driver Disk is needed."

There is also a window behine it, with the following "Coping Files..." And under the heading it says c:\BROHL134.PPD

So the system is looking for that driver in c:\ however the file is located on the network in the same dir as OEMHL01A.INF

Any suggestions welcome

How to remove advertisement from MSFN



    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
You might want to try using the prndrvr.vbs included in xp.




  • Member
  • 18 posts
Thanks for your input allen2

I have also tried the prndrvr.vbs command and prnport.vbs

Turns out that If I want to use prndrvr.vbs, then I first have to create the port.
I've got problems with that as well

The full path to the cups printer is :
The following prnport.vbs command completes without an error, but does NOT create a full path.

C:\>cscript C:\WINDOWS\System32\Prnport.vbs -a -r "IP_Internet Port" -h "" -o RAW -n 631
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Created/updated port IP_Internet Port

However, if I run the command with the full path, it fails :

C:\>cscript C:\WINDOWS\System32\Prnport.vbs -a -r "IP_Internet Port" -h "" -o RAW -n 631
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Unable to create/update port IP_Internet Port Error 0x80041008 Invalid parameter

I am trying to find the solution on google, but am not having any luck, will continue.

The low tech solution is to copy all the driver files and dependents to my c:\ before running the script, run the script, and then delete the files from c: after :(

I can add the IPP cups printer to windows xp using a gui, but I need it scripted for efficiency

Edited by remush, 16 October 2012 - 07:01 PM.




  • Member
  • 18 posts
Problem was that the drivers have to be in the same dir as the batch file.

My batch file was located at c:\ which is why I was prompted for driver files located at c: as I posted earlier.

heres my work around.

xcopy "\\adrafileserver\drivers\Brother HL-1430\Driver\pcl\Win2k_xp\ENGLISH" c:\brother_HL-1430_driver /d /c /h /e /i /y /r
cd c:\brother_HL-1430_driver

rundll32 printui.dll,PrintUIEntry /b "Brother HL-1430 series" /x /n "Brother HL-1430" /if /f "OEMHL01A.INF" /r "" /m "Brother HL-1430 series"

cd c:\

rmdir c:\brother_HL-1430_driver /s /q

I'm copying the driver files to a folder on my c:
changing dir into that folder
running the command to install the printer
changing dir to c:\
deleting the folder that contains the driver files

I would prefer to change change dir to the folder on my server that contains the files instead of loading up my network, however got the following error when i tried.

C:\>cd "\\adrafileserver\drivers\Brother HL-1430"
'\\adrafileserver\drivers\Brother HL-1430'
CMD does not support UNC paths as current directories.

I guess I could create a mapped drive first, and do it that way...

As always any comments and suggestions are welcome.




  • Member
  • 18 posts
Here's the Final solution.

Yep I used a mapped drive

REM Create Mapped Drive
net use z: "\\adrafileserver\drivers\Brother HL-1430\Driver\pcl\Win2k_xp\ENGLISH"
cd z:

REM Install Printer
rundll32 printui.dll,PrintUIEntry /b "Brother HL-1430 series" /n "Brother HL-1430" /if /f "z:\OEMHL01A.INF" /r "" /m "Brother HL-1430 series"

REM Delete Mapped Drive
cd c:
net use z: /delete

Be aware !!!!

I noticed that if the printer is installed as a network printer, that MS Word 2007 runs very slow. Did a bit of research and it turns out that word is querying the server for information about the printer constantly. Which causes the lag in word.

So a bit of googling turns up the solution to install the IPP Internet Printer as a Local Printer using the IP address as the port. To do this with the gui, you have to install the printer as an internet printer, delete it, and then re install the printer as a local printer, and use the port created when you installed it as a ipp printer. Why ? I could not simply install the ipp path as a port, perhaps there is a way, but I have not found it. Windows refuses to accept the full path as a local port or as a tcp/ip port when manually creating ports with windows xp "Printers and Faxes" > "Server Properties" > Ports Tab > Add Port button.

Information here was helpful.

Sample of How to Add an IPP Printer

rundll32 printui.dll,PrintUIEntry /b "DisplayPrinterName on http" /x /n "part of the n switch" /if /f %windir%\inf\ntprint.inf /r "http://hostname/prin...ename/.printer" /m "HP Laserjet 4000 Series PCL"
Note The /x switch is not documented with /?. The /x switch expects /n even though it is not used. Also, you may be using a printer other than the HP Laserjet 4000 Series PCL. The /x flag treats the install as a “Web point and print.” This flag indicates that the printer is a masquerading (masq) printer. A masq printer is partly local printer and partly a network printer. A masq printer receives rich notifications from the remote print server. Without the /x option, the printer is a local printer with a redirected port. It works fine, but it has very limited notifications.

So I removed /x from my command, and the ipp printer was installed as a local printer using an ipp port, instead of as a ipp printer using an ipp port.

Live Long and Prosper :)

Edited by remush, 16 October 2012 - 08:03 PM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

How to remove advertisement from MSFN