Installing Network printer by command prompt

9,094

You have to have a port first.

make a port and try this

rundll32 printui.dll,PrintUIEntry /if /b "MY PRINTER" /f "MYPRNDRV.inf" /r "YOUR_PORT_NAME" /m "MY PRINTER" /z

r use for port name - [/r[port] port name]

And you can create a port by using 'prnport.vbs'.
in win7 you can find it from "C:\Windows\System32\Printing_Admin_Scripts\en-US" find more details here

this is how create a port. And you have to in put the IP address, so you need to find a way to get the IP address.
(if the device IP address is 10.2.17.140, command will be like this)

cscript prnport.vbs -a -r YOUR_PORT_NAME P -h 10.2.17.140 -o raw
Share:
9,094

Related videos on Youtube

mhs
Author by

mhs

simply,a programer!

Updated on September 18, 2022

Comments

  • mhs
    mhs almost 2 years

    I want to install a network printer. and I have INF based drivers with me.

    I tried bellow command

    rundll32 printui.dll,PrintUIEntry /in /n "MY PRINTER" /ia /f "MYPRNDRV.inf" /h "x64"
    

    It looks like drivers have added to the PC, but not listed on Devices and Printers.

    My drivers working fine. It can be installed manually.

    Can anyone help me through this? Am i need to find the IP address of the printer? If i could find the IP, how the command should be written?