Solved

batch file for creating printers

Posted on 2004-04-01
3
722 Views
Last Modified: 2011-10-25
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
0
Comment
Question by:bomek
  • 2
3 Comments
 
LVL 83

Expert Comment

by:oBdA
ID: 10734629
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
0
 

Author Comment

by:bomek
ID: 10741060
Nope, it's for printer directly using there IP
0
 
LVL 83

Accepted Solution

by:
oBdA earned 250 total points
ID: 10741580
Then you need rundll32 and the following articles:

How to Add Printers with No User Interaction in Windows
http://support.microsoft.com/?kbid=189105

How to Add Printers with No User Interaction in Windows XP
http://support.microsoft.com/?kbid=314486
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now