HP DesignJet T3500 System Administrator s Guide - Page 32
Set objShell = WScript.CreateObject WScript.shell
View all HP DesignJet T3500 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 32 highlights
HP DJ UPD SAG 'Get printer name from inf ReadInf infFile, printer if configVerbosity = 1 then wscript.echo "Candidate Printer Name = " + printer end if driverName = """" + printer + """" ' Check the actual name of queue printers installed to choice the name that we use to install new queue CheckPrinterName printer if configVerbosity = 1 then wscript.echo "Final Printer Name = " + printer end if ' Add Port if local = 0 then AddTCPIPPort hostAddress, portName else if not (PortExists(portName)) then AddLocalPort portName if configVerbosity = 1 then wscript.echo "Restarting the spooler..." end if WScript.Sleep(10000) end if end if ' Install Driver and Printer DoInstall printer, infFile, portName, driverName, configVerbosity ' Share printer if needed if configSharing = 1 then SharePrinter printer end if wscript.echo "Installation Done" end sub This function allows the user to install new Driver and Printer on client ' Input Params: ' - printer: The Printer Name ' - infFile: Full path of INF file ' - portName: Port name ' - strDriver: Driver name ' Output Parms: ' - N/A Public Function DoInstall (printer, infFile, portName, strDriver, configVerbosity) Dim strShellLine, lShellResults, objShell Set objShell = WScript.CreateObject ("WScript.shell") strShellLine = "rundll32 printui.dll, PrintUIEntry /if /b " + printer + " /f " + infFile + " /r " + portName + " /m " + strDriver 32