Solved

script to remove and add network printers when users login

Posted on 2011-02-28
6
263 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
ID: 35004264
What OS are the workstations running?
0
 

Author Comment

by:grnow
ID: 35004283
xp pro
0
 
LVL 4

Assisted Solution

by:ong-hh
ong-hh earned 100 total points
ID: 35004320
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
mnation1 earned 250 total points
ID: 35004324


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:hdhondt
hdhondt earned 150 total points
ID: 35005057
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
ID: 35144182
sorry no appropriate time to try it out the above suggestions 1st...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Causes of paper jams:The following are the main causes of paper jams. Guides:If the guides for the paper are not set correctly they may cause the paper to enter at an angle. You should ensure that the guides are set correctly for the paper type a…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

763 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