1

I have a file server that holds all of the printers my company uses. Lets call this \printers. I can add the printers by browsing to this location and double clicking on the printer. It will install the correct driver and I am good to go. I want to be able to do this via command line so that I can add printers to peoples computers without having to log remote into their computers.

I know that I can add printers via the IP address that they use. I was just thinking that if I could enter in a command to browse to the \printers location and run the printer name and add the printer.

Thanks for any information.

1
  • Could you specify on which operating system the printer should be installed? Mar 30, 2016 at 21:02

2 Answers 2

0

If you're using group policy, you can do it with that. That is probably the perfered method.

But you asked for command line. Try this out:

rundll32 printui.dll,PrintUIEntry /in /n "\\servername\printername
1
  • rundll32 printui.dll,PrintUIEntry /in /n "\\servername\printername worked. Thanks Nixphoe
    – csanford
    Mar 31, 2016 at 20:46
1

Are you on a domain? You should be doing this via group policy.

If not, then you can do this using the using the Windows Scripting host WshNetwork.AddPrinterConnection method from vbscript or powershell. Using this through powershell should be as simple as something like this. You may get a UAC prompt.

(New-Object -ComObject WScript.Network).AddWindowsPrinterConnection("\\ps-01\prn-01")

Versions of windows newer than (8/2012) also have the powershell Add-Printer.

1
  • Oh, powershell! me gusta
    – Nixphoe
    Mar 30, 2016 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .