PrintServer.InstallPrintQueue Method (String, String, String[], String, PrintQueueAttributes, String, String, String, String, Int32, Int32)
![]() |
---|
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 shared, prioritized print queue, and associated printer driver, on the print server.
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 )
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.
- printQueueShareName
-
Type:
System.String
The share name of the new queue.
- printQueueComment
-
Type:
System.String
A comment about the queue that is visible to users in the Microsoft Windows UI.
- printQueueLocation
-
Type:
System.String
The location of the new queue.
- printQueueSeparatorFile
-
Type:
System.String
The path of a file that is inserted at the beginning of each print job.
- printQueuePriority
-
Type:
System.Int32
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
-
Type:
System.Int32
A value from 1 through 99 that specifies the default priority of new print jobs that are sent to the queue.
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.
Available since 3.0