Technology computers-hardware

How to Install Printers With VBScript

    • 1). Click the Windows "Start" button. Type "notepad" into the search text box and press "Enter." This opens your editor where you create your VBScript code.

    • 2). Type the following code into the Notepad editor:

      Set network = CreateObject("WScript.Network")

      objNetwork.AddWindowsPrinterConnection "HP Printer 2600"

      In this example, the HP Printer 2600 is installed on the computer. You can install any Windows device driver for a printer in your VBScript code.

    • 3). Click the "File" menu item and then click "Save As." Enter a name for the file and enter a ".vbs" extension into the file name. The "vbs" file extension tells Windows to execute the file instead of opening it into a text editor.



Leave a reply