Skip to content

Net_AddPrinter

Adds a connection to a shared network printer. Only printers on Windows networks are supported. If the printer is already connected, the connection is removed and added again.

Printer connections belong to the user. Use the function in a user (US) job, so the printer is added for the logged-on user.

Net_AddPrinter(sPrinterShare, s9xPrinterDriver, bSetAsDefault) As Boolean

UNC path to the network printer

Not used on current Windows versions. Use an empty string. (Printer driver name for Windows 9x and ME only.)

Set this printer as default printer

If bStatus Then bStatus = Net_AddPrinter("\\CAPAINSTALLER\PRINTERSHARE", "", True)

Scripting Guidelines

Net_SetDefaultPrinter Net_DeletePrinter Net_EnumPrinters Net_EnumPrinterPaths Constants Package Property Variables