Solved

Map/Change printer via Logon Script

Posted on 2012-04-13
2
316 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
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 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
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…

708 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

11 Experts available now in Live!

Get 1:1 Help Now