The
Win32_PrinterDriver
WMI class represents the drivers for a
Win32_Printer instance.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties, but excludes methods. For reference information about methods, see the table of methods in this topic.
Syntax
class Win32_PrinterDriver : CIM_Service
{
string Caption;
string ConfigFile;
string CreationClassName;
string DataFile;
string DefaultDataType;
string DependentFiles[];
string Description;
string DriverPath;
string FilePath;
string HelpFile;
string InfName;
datetime InstallDate;
string MonitorName;
string Name;
string OEMUrl;
boolean Started;
string StartMode;
string Status;
string SupportedPlatform;
string SystemCreationClassName;
string SystemName;
uint16 Version;
};
Methods
The Win32_PrinterDriver class defines the following methods.
Properties
The Win32_PrinterDriver class defines the following properties.
- Caption
-
- Data type: string
- Access type: Read-only
- Qualifiers: MaxLen(64)
Short description of the object—a one-line string. This property is inherited from CIM_ManagedSystemElement.
- ConfigFile
-
- Data type: string
- Access type: Read-only
Configuration file for this printer driver.
Example: "pscrptui.dll"
- CreationClassName
-
- Data type: string
- Access type: Read-only
Name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified. This property is inherited from CIM_Service.
- DataFile
-
- Data type: string
- Access type: Read-only
- Qualifiers: ModelCorrespondence(CIM_DataFile.FileName)
Data file for this printer driver.
Example: "qms810.ppd"
- DefaultDataType
-
- Data type: string
- Access type: Read-only
Default data type for this printer driver.
Example: "EMF"
- DependentFiles
-
- Data type: string array
- Access type: Read-only
Array of dependent files for this printer driver.
- Description
-
- Data type: string
- Access type: Read/write
Comment that describes the link. This property is inherited from CIM_ManagedSystemElement.
- DriverPath
-
- Data type: string
- Access type: Read-only
- Qualifiers: ModelCorrespondence(CIM_DataFile.Path)
Path for this printer driver.
Example: "C:\\drivers\\pscript.dll"
- FilePath
-
- Data type: string
- Access type: Read/write
Path to the INF file being used.
Example: "c:\\temp\\driver"
- HelpFile
-
- Data type: string
- Access type: Read-only
Help file for this printer driver.
Example: "pscrptui.hlp"
- InfName
-
- Data type: string
- Access type: Read/write
Name of the INF file being used. The default is to use an operating system provided printer INF file. A different file name is used if the driver is provided directly by the manufacturer of the printer and not the operating system.
Windows Server 2003, Windows XP, Windows 2000, Windows XP, Windows NT 4.0, and Windows Me/98/95: The default name is "ntprint.inf".
- InstallDate
-
- Data type: datetime
- Access type: Read-only
Date and time the object is installed. This property does not require a value to indicate that the object is installed. This property is inherited from CIM_ManagedSystemElement.
- MonitorName
-
- Data type: string
- Access type: Read-only
Name of the monitor for this printer driver.
Example: "PJL monitor"
- Name
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Driver name for this printer. This is a compound key composed of the
Name, Version, and SupportedPlatform values. This property is inherited from CIM_ManagedSystemElement and overrides the
Name definition in that class.
- OEMUrl
-
- Data type: string
- Access type: Read-only
World Wide Web (WWW) link to the printer manufacturer's Web site. Note that this property is not populated when the Win32.inf file is used, and is only applicable for drivers provided directly from the manufacturer.
- Started
-
- Data type: boolean
- Access type: Read-only
- Qualifiers: Key
If TRUE, the service is started. If FALSE, the service is stopped. This property is inherited from CIM_Service.
- StartMode
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Start mode of the service is automatically started by an operating system, or only started when requested. This property is inherited from CIM_Service.
The following are possible values:
- "Automatic"
- "Manual"
- Status
-
- Data type: string
- Access type: Read-only
- Qualifiers: MaxLen(10)
Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", can apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states. This property is inherited from CIM_ManagedSystemElement.
The values are:
- "OK"
- "Error"
- "Degraded"
- "Unknown"
- "Pred Fail"
- "Starting"
- "Stopping"
- "Service"
- "Stressed"
- "NonRecover"
- "No Contact"
- "Lost Comm"
- SupportedPlatform
-
- Data type: string
- Access type: Read/write
Operating environments that the driver is intended for.
Example: "Windows NT x86".
- SystemCreationClassName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Propagated(CIM_System.CreationClassName)
Scoping system's creation class name. This property is inherited from CIM_Service.
- SystemName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Propagated(CIM_System.Name)
Name of the system that hosts this service. This property is inherited from CIM_Service.
- Version
-
- Data type: uint16
- Access type: Read/write
Operating system version for the printer driver.
| Value | Meaning |
- 0
| Win9x
|
- 1
| Win351
|
- 2
| NT40
|
- 3
| Win2k
|
Remarks
The
Win32_PrinterDriver class is derived from CIM_Service which derives from CIM_LogicalElement.
Users can uninstall a printer driver by deleting a corresponding instance of this class. To do so, the calling process must have the SeLoadDriverPrivilege privilege set to delete an instance of this class.
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
| Minimum supported client | Windows XP |
| Minimum supported server | Windows Server 2003 |
| MOF | Cimwin32.mof |
| DLL | Cimwin32.dll |
| Namespace | \root\cimv2 |
See Also
- Computer System Hardware Classes
Send comments about this topic to Microsoft
Build date: 11/3/2009