Easy printer login scripts without VB

Enigma MachineWhy 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

6 Responses to “Easy printer login scripts without VB”

  1. Another Great post for the people who need it, google it up :)

  2. This is great but does it do it for all user profiles on the workstation?

  3. It will work on whatever users or machines (or combination thereof) the script is assigned to via Group Policy.

  4. Software Development Guide…

    I couldn’t understand some parts of this article, but it sounds interesting…

  5. Is there a way to delete printers that were created with the following line in a logon script?

    start \\server\printer

  6. We checked whole internet to readsomething related to this field… Thank you very much

Leave a Reply