Solved

batch file for creating printers

Posted on 2004-04-01
3
723 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Images sometimes not printed 6 477
Retrieve process time in memory in VB 6 120
Windows SBS 2003 filling up disk with NTbackup files 6 177
Terminal 2000 connection RDP 5 137
What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

948 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

20 Experts available now in Live!

Get 1:1 Help Now