Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Map/Change printer via Logon Script

Posted on 2012-04-13
2
Medium Priority
?
354 Views
Last Modified: 2012-05-09
Hi,

We have a new Printer Server and I'd like to know, is the following possible:

Create a script that will look at the network printers currently mapped on a PC and map to another printer based on what it finds?

For instance:

Computer1 has \\printserverold\printer1 mapped.

Can a script run at logon that will say:  

"Right, I've found \\printserverold\printer1 so remove this and map \\printerservernew\printer1

Crucially, the printer share names are the same on both the new and old Printer Servers.

Hopefully I've explained ok!  

Thanks
0
Comment
Question by:paul-ashton
[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 Comments
 
LVL 8

Expert Comment

by:X-treem
ID: 37841846
use loginscript, vbs and then

set objN = CreateObject("Wscript.Network")

EnumPrinterConnections
RemovePrinterConnection

objN.AddWindowsPrinterConnection "\\server\printer"
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 2000 total points
ID: 37848201
Hi, there's a post here that uses a script I created some time back:
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Q_26832394.html

Let me know if you need any help with it.

Regards,

Rob.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

604 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