Get the App
SLTechnology News&Howtos  ›  Development  › 

How to install network printers in batches and set default printers with VBScript

Shulou Source: shulou.com Published: 2022-06-03 06:50:40 10月03日 Update

This article mainly introduces how to use VBScript to install network printers and set default printers in batches. This article is very detailed and has a certain reference value. Interested friends must finish reading!

First open notepad and enter the following:

The code is as follows:

Set WshNetwork = CreateObject ("WScript.Network")

WshNetwork.AddWindowsPrinterConnection "\\ your network printer location 1"

WshNetwork.AddWindowsPrinterConnection "\\ your network printer location 2"

WshNetwork.AddWindowsPrinterConnection "\\ your network printer location 3"

WshNetwork.SetDefaultPrinter "\\ you want to set the location of the default network printer"

Then save it as printer.vbs, run it, or put it in the policy to let the managed machine boot up and run this program.

The above is all the contents of the article "how to install network printers in bulk with VBScript and set default printers". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Printer network location content article run code value interest guy partner more machine knowledge program strategy industry notepad information information channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux macOS Shulou Tech Info MySQL NVidia