VBS Printer Scripting install Printer to a local port (network share)
Been tearing my hair out with this.
we have several room which need the printers to be changed as the ports are going to be wrong when the servers are changed (ports names wrong)
the printers are install as a local port printer with the port set to "\\servername\printersharename"
so when you look at the port properties it says local port and then lists the share.
i have tried using PRNadmin.dll and VBS but i get an error about the module not found (script is just installing a dummy to make sure the script functions as im not that good at scripting lol)
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
set oPrinter = CreateObject("Printer.Printer.1")
oPrinter.PrinterName = "test_Printer"
oPrinter.DriverName = "Epson T-1000"
oPrinter.PortName = "lpt1:"
if Err <> 0 then
'An Error Occurred
so looked at using prnport.vbs prnmngr.vbs which work but install the printer using direct IP which is not what is required.
RUNDLL32 PRINTUI.DLL,PrintUIEntry doesnt appear to support local printing ports to shares?
going round the houses so looking for a point on which is the better route to take.