Easy printer login scripts without VB
Posted by The Technocrat | Filed under Coding, Geeky, Hardware
Why does everyone use crazy custom VB script to assign printers?
You can do most anything with a regular batch file and XP's built-in prnmngr.vbs. I just had to remove 3 printers from an entire OU and have 3 new ones connected. Check out these batch file commands, and make it easy on yourself! (You can find more info on prnmngr.vbs here.)
To remove a network printer
cscript C:\WINDOWS\system32\prnmngr.vbs -d -p "\\server\printer share name"
To remove all connected printers on a workstation for a specific server
cscript C:\WINDOWS\system32\prnmngr.vbs -d -p "\\server\*"
note: specify the server, or local printers will be deleted also)
To add a network printer
cscript C:\WINDOWS\system32\prnmngr.vbs -ac -p "\\server\printer_share_name"
To set a printer as the default cscript C:\WINDOWS\system32\prnmngr.vbs -t -p "\\server\printer_share_name"
note: this will set a network printer as the default, don't use if the workstation has a local printer
April 24, 2006 at 9:33 am
Another Great post for the people who need it, google it up
November 30, 2006 at 10:35 am
This is great but does it do it for all user profiles on the workstation?
November 30, 2006 at 12:40 pm
It will work on whatever users or machines (or combination thereof) the script is assigned to via Group Policy.
October 20, 2007 at 1:17 am
Software Development Guide…
I couldn’t understand some parts of this article, but it sounds interesting…
August 6, 2008 at 9:17 am
Is there a way to delete printers that were created with the following line in a logon script?
start \\server\printer
July 10, 2010 at 3:58 pm
We checked whole internet to readsomething related to this field… Thank you very much