Solved

Map/Change printer via Logon Script

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 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

12 Experts available now in Live!

Get 1:1 Help Now