Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

batch file for creating printers

Posted on 2004-04-01
3
Medium Priority
?
730 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 85

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 85

Accepted Solution

by:
oBdA earned 1000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Files go missing when using DFS (Distributed File System) Replication and how to recover them and fix it.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

722 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