Net\_AddPrinter
Description
Section titled “Description”Adds a network printer to the computer. Only printers on Windows networks are supported
Syntax
Section titled “Syntax”Net_AddPrinter(sPrinterShare, s9xPrinterDriver, bSetAsDefault) As Boolean
Parameters
Section titled “Parameters”sPrinterShare (String)
UNC path to the network printer
s9xPrinterDriver (String)
Printer driver name (only Windows 9x and ME)
bSetAsDefault (Boolean)
Set this printer as default printer
Example
Section titled “Example”VBScript
'Add a printerIf bStatus Then bStatus = Net_AddPrinter("\\CAPAINSTALLER\PRINTERSHARE", "", True)
'Add a printer in Windows 9x/MEIf bStatus Then bStatus = Net_AddPrinter("\\CAPAINSTALLER\PRINTERSHARE", "HP DeskJet 1200N", False)Related functions
Section titled “Related functions”Net_SetDefaultPrinter Net_DeletePrinter Net_EnumPrinters Net_EnumPrinterPaths