Solved

Map/Change printer via Logon Script

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

770 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