PrintServer.InstallPrintQueue Method (String, String, String[], String, PrintQueueAttributes, PrintQueueStringProperty, Int32, Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Installs a prioritized print queue, and associated printer driver, on the print server.

Namespace:   System.Printing
Assembly:  System.Printing (in System.Printing.dll)

public PrintQueue InstallPrintQueue(
	string printQueueName,
	string driverName,
	string[] portNames,
	string printProcessorName,
	PrintQueueAttributes printQueueAttributes,
	PrintQueueStringProperty printQueueProperty,
	int printQueuePriority,
	int printQueueDefaultPriority
)

Parameters

printQueueName
Type: System.String

The name of the new queue.

driverName
Type: System.String

The path and name of the printer driver.

portNames
Type: System.String[]

The IDs of the ports that the new queue uses.

printProcessorName
Type: System.String

The name of the print processor.

printQueueAttributes
Type: System.Printing.PrintQueueAttributes

The attributes, as flags, of the new queue.

printQueueProperty
Type: System.Printing.PrintQueueStringProperty

The comment, location, or share name of the new queue.

printQueuePriority
Type: System.Int32

A value from 1 through 99 that specifies the priority of this print queue relative to other queues that are hosted by the print server.

printQueueDefaultPriority
Type: System.Int32

A value from 1 to 99 that specifies the default priority of print jobs that are sent to the queue.

Return Value

Type: System.Printing.PrintQueue

The newly created PrintQueue.

Use the printQueueProperty parameter to initialize one, and only one, of the queue's ShareName, Comment, or Location properties. If you want to initialize more than one, use the InstallPrintQueue(String, String, String[], String, PrintQueueAttributes, String, String, String, String, Int32, Int32) overload of this method.

.NET Framework
Available since 3.0
Return to top
Show: