Question : Add network printer via command prompt?

Is there a way to add a network printer via the command prompt.

I'm thinking about doing this through a logon script for terminal services users.

If there is how do drivers etc work?

Many thanks.

Answer : Add network printer via command prompt?

I have used a script/batch file similar to below to add printers. Works fine so long as the drivers for the local machine OS have been installed/added on the remote machine.

Download con2prt.exe which is part of the Microsoft Administration kit available here:
http://www.microsoft.com/ntworkstation/downloads/Recommended/Featured/NTZAK.asp
Or just the con2prt.exe file here:
http://www3.ns.sympatico.ca/malagash/Downloads/Printers/con2prt.exe

Copy con2prt.exe to the Netlogon share of your server. (default location of logon scripts)
  C:\Windows\SYSVOL\sysvol\YourDomainName\scripts
Note, if you need the exact name of the printer share, log on to that workstation or server and enter Net Share at a command line
If the share name has spaces you will have to enclose it with " " .
If you are not familiar with batch files copy the text to notepad to edit and then save as something like LogOn.bat and again put in your Netlogon share folder on the server.
The lines starting with :: are comment lines and will be ignored or you can remove.
There are many other ways to do this using rundll32 or VBS scripts, but this is likely the simplest.
--------------------------------------------------------------------------------
::  You need to download con2prt.exe,
::    Copy to the NetLogOn server share - the default directory for the logon batch files
::    replace SrvrName with the name of the server with the Netlogon share
::    Netlogon share is located on the server in C:\Windows\SYSVOL\sysvol\YourDomainName\Scripts

::  If at some point you wish to delete all printers enable the following line by removing the Rem
Rem  \\SrvrName\Netlogon\con2prt.exe  /f

::  Install the default printer
::   replace WkstName with the name of the server or workstation the to which the printer is connected
::   replace Printer#x with the exact share name or the printer on the workstation
::    Note if the share contains spaces surround it with quotations e.g. "\\WkStn1\HP Laser"
\\SrvrName\Netlogon\con2prt.exe  /cd  \\WkstName\Printer1

::  Install other printers -You can add as many as you like
\\SrvrName\Netlogon\con2prt.exe  /c  \\WkstName\Printer2
\\SrvrName\Netlogon\con2prt.exe  /c  \\WkstName\Printer3
Random Solutions  
 
programming4us programming4us