Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Adds a network printer to the computer. Only printers on Windows networks are supported

 


Syntax

Net_AddPrinter(sPrinterShare, s9xPrinterDriver, bSetAsDefault) As Boolean 


Parameters

sPrinterShare (String)

...

Set this printer as default printer


Example

Code Block
language
languagevb
themeEclipse
vbtitleVBScript
'Add a printer
If bStatus Then bStatus = Net_AddPrinter("\\CAPAINSTALLER\PRINTERSHARE", "", True)

'Add a printer in Windows 9x/ME
If bStatus Then bStatus = Net_AddPrinter("\\CAPAINSTALLER\PRINTERSHARE", "HP DeskJet 1200N", False)

Scripting Guidelines 


Related functions

Net_SetDefaultPrinter Net_DeletePrinter Net_EnumPrinters Net_EnumPrinterPaths