vbscript setup printer
Posted on 2014-01-28
I would like to use visual basic script to setup network printers on a remote pc. this is what i have so far
Dim printer, UNCpath1, slash1, slash2, printername
slash2 = "\\"
slash1 = "\"
printername = InputBox("What printer do you want to be the default? ", "Create Default Printer")
UNCpath1 = InputBox("What server is this printer on? ", "Server")
Set printer = CreateObject("WScript.Network")
printer.AddWindowsPrinterConnection slash2 & UNCpath1 & slash1 & printername
It works if I run it on the computer I'm logged into. But I would like to run it on the computer that I am logged into, to install a printer on a remote computer.