Solved

script to remove and add network printers when users login

Posted on 2011-02-28
6
257 Views
Last Modified: 2012-05-11
is there a script to to remove some network printers, add a new network printer and set this printer as the default when a user log in?
0
Comment
Question by:grnow
6 Comments
 
LVL 3

Expert Comment

by:mnation1
Comment Utility
What OS are the workstations running?
0
 

Author Comment

by:grnow
Comment Utility
xp pro
0
 
LVL 4

Assisted Solution

by:ong-hh
ong-hh earned 100 total points
Comment Utility
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 3

Accepted Solution

by:
mnation1 earned 250 total points
Comment Utility


Something like this should work.  ( compiled from http://www.petri.co.il/forums/showthread.php?t=6352, and http://www.petri.co.il/forums/showthread.php?t=6486)

Set WshNetwork = CreateObject("WScript.Network")
Set objShell = CreateObject("Wscript.Shell")

WshNetwork.RemovePrinterConnection "\\PrintServer\OldPrinterName"

WshNetwork.AddWindowsPrinterConnection "\\PrintServer\NewPrinterName"

WshNetwork.SetDefaultPrinter "\\PrintServer\NewPrinterName"

Open in new window

0
 
LVL 38

Assisted Solution

by:Herman D'Hondt
Herman D'Hondt earned 150 total points
Comment Utility
You can use RUNDLL32 to add and delete printers, as well as many other things. See:

http://www.robvanderwoude.com/2kprintcontrol.php
0
 

Author Comment

by:grnow
Comment Utility
sorry no appropriate time to try it out the above suggestions 1st...
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

9 Experts available now in Live!

Get 1:1 Help Now