This documentation is archived and is not being maintained.

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

Installs a shared, 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,
	string printQueueShareName,
	string printQueueComment,
	string printQueueLocation,
	string printQueueSeparatorFile,
	int printQueuePriority,
	int printQueueDefaultPriority
)
public PrintQueue InstallPrintQueue (
	String printQueueName, 
	String driverName, 
	String[] portNames, 
	String printProcessorName, 
	PrintQueueAttributes printQueueAttributes, 
	String printQueueShareName, 
	String printQueueComment, 
	String printQueueLocation, 
	String printQueueSeparatorFile, 
	int printQueuePriority, 
	int printQueueDefaultPriority
)
public function InstallPrintQueue (
	printQueueName : String, 
	driverName : String, 
	portNames : String[], 
	printProcessorName : String, 
	printQueueAttributes : PrintQueueAttributes, 
	printQueueShareName : String, 
	printQueueComment : String, 
	printQueueLocation : String, 
	printQueueSeparatorFile : String, 
	printQueuePriority : int, 
	printQueueDefaultPriority : int
) : PrintQueue
Not applicable.

Parameters

printQueueName

The name of the new queue.

driverName

The path and name of the printer driver.

portNames

The IDs of the ports that the new queue uses.

printProcessorName

The name of the print processor.

printQueueAttributes

The attributes, as flags, of the new queue.

printQueueShareName

The share name of the new queue.

printQueueComment

A comment about the queue that is visible to users in the Microsoft Windows UI.

printQueueLocation

The location of the new queue.

printQueueSeparatorFile

The path of a file that is inserted at the beginning of each print job.

printQueuePriority

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

printQueueDefaultPriority

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

Return Value

The newly created PrintQueue.

If you do not want to initialize all three of the queue's ShareName, Comment, or Location properties; you can pass an empty string for one or more of printQueueShareName, printQueueComment, and printQueueLocation. If you want to initialize just one of these properties, use the InstallPrintQueue(String,String,String[],String,PrintQueueAttributes,PrintQueueStringProperty,Int32,Int32) overload of this method.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: