net use networked printers

Posted on 2003-03-24
Medium Priority
Last Modified: 2012-08-14
I need to use a batch file so our networked users can connect to network printers.  They are currently mapped to network printers and I need to disconnect them from this particular server and reattach them to these same printers that located on a different server.
Question by:mkflore
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

Expert Comment

ID: 8200430

create another batch file that maps the users to local printers.

Accepted Solution

mikhael earned 100 total points
ID: 8201984
Why don't you use something like mine....

net use f: /delete
net use f: "\\server\my documents"

net use y: /delete
net use y: \\server\zip

net use g: /delete
net use g: "\\mitchell\utilities"

net use lpt3 /delete
net use lpt3 \\server\canon

REM note double quotes for long share names

Expert Comment

ID: 8205133
Try using a VBScript...

set net = CreateObject("Wscript.network")
use addwindowprinterconnection
and removeprinterconnection
and enumprinterconnection method (do a quick search on these key word and you'll find an exemple easily)


Assisted Solution

christians102 earned 100 total points
ID: 8224436
Here is the commands I have in my batch file to do exactly what you are asking for. I downloaded a program from the Zero Administration Kit called Con2Prt.exe.

con2prt.exe /f    'removes all printer connections
con2prt.exe /cd \\domain\sharename   'connects to printer and makes it default.
con2prt.exe /c \\domain\sharename 'just connects to printer.

I use this batch file to connect the computers in my network to multiple shared printers.  Just set the "d" parameter after the printer you want to default to.

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
Resolve DNS query failed errors for Exchange
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 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