Skip to main content

11. NetworkResource class

Introduction

Connect and disconnect network services (disks and printers).

Constructor

NetworkResource

 

Creates an object of type NetworkResource.

Methods

connectPrinter

resource: string

model: string

Connects a remote printer to the local spooler.

connectDrive

localDrive: string

resource: string

password: string (optional)

user: string (optional)

Connects a network drive.

disconnectAllPrinters

 

Disconnects all remote printers.

disconnectPrinter

name: string

Disconnects a remote Printer.

disconnectDrive

localName: string

Disconnects a remote drive.