Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

script to remove and add network printers when users login

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
grnow
Asked:
grnow
3 Solutions
 
mnation1Commented:
What OS are the workstations running?
0
 
grnowAuthor Commented:
xp pro
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
mnation1Commented:


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
 
hdhondtCommented:
You can use RUNDLL32 to add and delete printers, as well as many other things. See:

http://www.robvanderwoude.com/2kprintcontrol.php
0
 
grnowAuthor Commented:
sorry no appropriate time to try it out the above suggestions 1st...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now