Link to home
Start Free TrialLog in
Avatar of bomek
bomek

asked on

batch file for creating printers

I would like to know if it's possible to create a batch file to automate the process of creating printers by setting the IP, Name, Location and drivers of the printer.

Thanks a lot
Avatar of oBdA
oBdA

That would be network printers, probably in a logon script? You can use con2prt.exe from the Zero Administration Toolkit for that (that's for NT4, but still runs fine on W2k and XP).
S{a|i}mple logon script, including mapping depending on group membership:

====8<----[logon.cmd]----
:: *** Delete all mapped printers:
con2prt.exe /f
:: *** Map the printers according to group membership:
ifmember.exe YourDomain\Printer01Group
if not errorlevel 1 goto EndPrinter01Group
con2prt.exe /c \\PrintServer\Printer01
:EndPrinter01Group

ifmember.exe YourDomain\Printer02Group
if not errorlevel 1 goto EndPrinter02Group
con2prt.exe /c \\PrintServer\Printer02
:EndPrinter02Group
====8<----[logon.cmd]----

How to Use Con2prt.exe to Connect to a Network Printer
http://support.microsoft.com/?kbid=181663

Zero Administration Kit
http://www.microsoft.com/ntworkstation/downloads/Recommended/Featured/NTZAK.asp

Resource Kits Free Tool Downloads: Ifmember.exe
http://www.microsoft.com/windows2000/techinfo/reskit/tools/new/ifmember-o.asp
Avatar of bomek

ASKER

Nope, it's for printer directly using there IP
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial