# Net_AddPrinter

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

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/network-functions/net-addprinter/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

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)

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

**VBScript**

```vb
'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](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[Net_SetDefaultPrinter](/capainstaller/vb-scripting-library/network-functions/net-setdefaultprinter/) [Net_DeletePrinter](/capainstaller/vb-scripting-library/network-functions/net-deleteprinter/) [Net_EnumPrinters](/capainstaller/vb-scripting-library/network-functions/net-enumprinters/) [Net_EnumPrinterPaths](/capainstaller/vb-scripting-library/network-functions/net-enumprinterpaths/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
