|
WMI Fun !! 〜 WMIに興味がある方・システム管理者必見!! 〜 WMI StepWMI SampleWMI ReferenceWMI LibraryMy Let'snotePersonalLinkAbout WMI Fun !! |
|
|
|
WMI Fun !! > WMI Library > Win32_Printer クラス |
|
|
Panasonic Let'snoteを長年愛用しています、その理由はMy Let'snoteで…
インクを買うよりもしかしたら安い?インクジェット複合機HP Photosmart 5510 白いご飯や日本酒にもとても合うにしんのきりこみがマイブームです Win32_Printer クラス - WMI LibraryWin32_Printer クラスの説明
プリンターの LogicalDevice の機能と管理です。
プロパティ リスト
AttributesData Type: uint32Access Type: Read WriteThe Attributes property indicates the attributes of the Win32 printing device. These attributes are represented through a combination of flags. Attributes of the printer include: AvailabilityData Type: uint16Access Type: Read Onlyデバイスの利用可能性と状態です。たとえば、Availability プロパティは、デバイスが実行中で通常の電力状態 (値 = 3) にあるか、警告 (4)、テスト中 (5)、低下 (10)、または省電力状態 (値 = 13-15 および 17) にあることを示します。省電力状態は次のように定義されています: 値 13 ("省電力 - 不明") は、デバイスが省電力モードになっていることは確かだが、省電力モードにおけるどの状態にあるかが不明であることを示します。値 14 ("省電力 - 低電力モード") は、デバイスが省電力状態になっているが機能しており、パフォーマンスは低下する場合があることを示します。値 15 ("省電力 - スタンバイ") は、デバイスが機能していないが、通常の電力での動作に 'すばやく' 移行できることを示します。値 17 ("省電力 - 警告") は、デバイスが警告状態になっているが、省電力モードでもあることを示します。 AvailableJobSheetsData Type: stringAccess Type: Read Onlyプリンターで利用可能なすべてのジョブ シートを記述します。また、これは、場合によってプリンターが各ジョブの初めに出力することがある見出しの記述や、その他のユーザー指定オプションの記述にも使用できます。 AveragePagesPerMinuteData Type: uint32Access Type: Read OnlyThe AveragePagesPerMinute property specifies the rate (average number of pages per minute) that the printer is capable of sustaining. CapabilitiesData Type: uint16Access Type: Read Onlyプリンター機能を示す整数の配列です。"両面印刷" (値 = 3) または "透明フィルム印刷" (7) などの情報がこのプロパティで指定されます。 CapabilityDescriptionsData Type: stringAccess Type: Read OnlyCapabilities 配列で示されるプリンター機能の詳細説明を提供する自由形式文字列の配列です。注意: この配列の各エントリは、Capabilities 配列の同じインデックスに配置されているエントリに対応します。 CaptionData Type: stringAccess Type: Read OnlyCaption プロパティは、オブジェクトを短いテキスト (1 行の文字列) で表した説明です。 CharSetsSupportedData Type: stringAccess Type: Read Onlyプリンターの管理に関連するテキストの出力に利用可能な文字セットを示します。このプロパティで提供される文字列は、RFC 2046 (MIME Part 2) のセクション 4.1.2 ("Charset parameter") に指定されている語義と構文に従い、また、IANA 文字セット レジストリに含まれている必要があります。例: "utf-8"、"us-ascii" および "iso-8859-1"。 CommentData Type: stringAccess Type: Read WriteThe Comment property specifies the comment of a print queue. ConfigManagerErrorCodeData Type: uint32Access Type: Read OnlyWin32 構成マネージャーのエラー コードを示します。次の値が返されます: ConfigManagerUserConfigData Type: booleanAccess Type: Read Onlyデバイスがユーザー定義の構成を使用しているかどうかを示します。 CreationClassNameData Type: stringAccess Type: Read OnlyCreationClassName は、インスタンスの作成で使用されるクラス名、またはサブクラス名を示します。このクラスの他のキー プロパティと一緒に使用すると、このクラスおよびそのサブクラスのインスタンスすべてがこのプロパティによって一意に識別されます。 CurrentCapabilitiesData Type: uint16Access Type: Read Only現在使用されている仕上がりおよびその他のプリンター機能の設定を指定します。このプロパティに含まれるエントリは、Capabilities 配列の一覧にも含まれている必要があります。 CurrentCharSetData Type: stringAccess Type: Read Onlyプリンターの管理に関連するテキストの出力に使用されている現在の文字セットを指定します。このプロパティによって記述される文字セットは、CharsetsSupported の一覧にも含まれている必要があります。このプロパティで指定される文字列は、RFC 2046 (MIME Part 2) のセクション 4.1.2 ("Charset parameter") に指定されている語義と構文に従い、また、IANA 文字セット レジストリに含まれている必要があります。例: "utf-8"、"us-ascii" および "iso-8859-1"。 CurrentLanguageData Type: uint16Access Type: Read Only現在使用中のプリンターの言語を示します。プリンターで使用される言語は LanguagesSupported の一覧にも含まれている必要があります。 CurrentMimeTypeData Type: stringAccess Type: Read OnlyMIME の種類を使用中であることが CurrentLanguage の設定で示されている場合 (値 = 47)、プリンターで現在使用されている MIME の種類を指定します。 CurrentNaturalLanguageData Type: stringAccess Type: Read Onlyプリンターで管理用に現在使用されている言語を示します。CurrentNaturalLanguage プロパティの一覧に含まれる言語は、NaturalLanguagesSupported の一覧にも含まれている必要があります。 CurrentPaperTypeData Type: stringAccess Type: Read Onlyプリンターが現在使用中の用紙の種類を指定します。文字列は RFC 1759 (Printer MIB) の Appendix C に要約されている ISO/IEC 10175 Document Printing Application (DPA) で指定されている形式で表記されなけばなりません。 DefaultData Type: booleanAccess Type: Read OnlyThe Default property indicates whether the printer is the default printer on the computer. DefaultCapabilitiesData Type: uint16Access Type: Read Only既定で使用される仕上がりおよびその他のプリンター機能の設定を指定します。DefaultCapabilities に含まれるエントリは、Capabilities 配列の一覧にも含まれている必要があります。 DefaultCopiesData Type: uint32Access Type: Read Only部数が指定されていない場合に単一のジョブで印刷される部数です。 DefaultLanguageData Type: uint16Access Type: Read Onlyプリンターの既定の言語を示します。プリンターに既定として使用される言語は LanguagesSupported の一覧にも含まれている必要があります。 DefaultMimeTypeData Type: stringAccess Type: Read OnlyMIME の種類を使用中であることが DefaultLanguage の設定で示されている場合 (値 = 47)、プリンターで使用される既定の MIME の種類を指定します。 DefaultNumberUpData Type: uint32Access Type: Read Onlyジョブで指定されていない場合にプリンターが単一のメディア シート上に出力する印刷ストリームのページ数です。 DefaultPaperTypeData Type: stringAccess Type: Read Only印刷ジョブで特定の種類が指定されない場合にプリンターで使用する用紙の種類を指定します。文字列は RFC 1759 (Printer MIB) の Appendix C に要約されている ISO/IEC 10175 Document Printing Application (DPA) で指定されている形式で表記されなければなりません。 DefaultPriorityData Type: uint32Access Type: Read WriteThe DefaultPriority property specifies the default priority value assigned to each print job. DescriptionData Type: stringAccess Type: Read OnlyDescription プロパティは、オブジェクトの説明を提供します。 DetectedErrorStateData Type: uint16Access Type: Read Onlyプリンター エラー情報です。 DeviceIDData Type: stringAccess Type: Read OnlyDeviceID は論理デバイスを一意に特定するためのアドレスまたは他の識別情報です。 DirectData Type: booleanAccess Type: Read WriteThe Direct property indicates whether the print jobs should be sent directly to the printer. This means that no spool files are created for the print jobs. DoCompleteFirstData Type: booleanAccess Type: Read WriteThe DoCompleteFirst property indicates whether the printer should start jobs that have finished spooling as opposed to the order of the job received. DriverNameData Type: stringAccess Type: Read WriteThe DriverName property specifies the name of the Win32 printer driver. EnableBIDIData Type: booleanAccess Type: Read WriteThe EnableBIDI property indicates whether the printer can print bidirectionally. EnableDevQueryPrintData Type: booleanAccess Type: Read WriteThe EnableDevQueryPrint property indicates whether to hold documents in the queue, if document and printer setups do not match ErrorClearedData Type: booleanAccess Type: Read OnlyErrorCleared は LastErrorCode プロパティで報告されたエラーが現在解決されているかどうかを示すブール値のプロパティです。 ErrorDescriptionData Type: stringAccess Type: Read OnlyErrorDescription は、LastErrorCode プロパティに記録されたエラーに関する詳細情報およびそれに対する修正アクションに関する情報を提供する自由形式の文字列です。 ErrorInformationData Type: stringAccess Type: Read WriteDetectedErrorState で示される現在のエラー状態について補足情報を提供する配列です。 ExtendedDetectedErrorStateData Type: uint16Access Type: Read OnlyThe ExtendedDetectedErrorState property reports standard error information. Any additional information should be recorded in the DetecteErrorState property. ExtendedPrinterStatusData Type: uint16Access Type: Read OnlyStatus information for a Printer, beyond that specified in the LogicalDevice Availability property. Values include "Idle" (3) and an indication that the Device is currently printing (4). HiddenData Type: booleanAccess Type: Read WriteThe Hidden property indicates whether the printer is hidden from network users. HorizontalResolutionData Type: uint32Access Type: Read Onlyプリンターの水平方向の解像度 (ピクセル/インチ) です。 InstallDateData Type: datetimeAccess Type: Read OnlyInstallDate プロパティは、オブジェクトがいつインストールされたかを示す datetime 値です。値がなくても、オブジェクトがインストールされていないことを示すわけではありません。 JobCountSinceLastResetData Type: uint32Access Type: Read Only前回のリセット後に処理された印刷ジョブです。これらのジョブは 1 つ以上の PrintQueues から処理されている可能性があります。 KeepPrintedJobsData Type: booleanAccess Type: Read WriteThe KeepPrintedJobs property indicates whether the print spooler should not delete the jobs after they are completed. LanguagesSupportedData Type: uint16Access Type: Read Onlyネイティブでサポートされている印刷言語を示す配列です。 LastErrorCodeData Type: uint32Access Type: Read OnlyLastErrorCode には、その論理デバイスで最後に報告されたエラー コードが記録されています。 LocalData Type: booleanAccess Type: Read WriteThe Local property indicates whether the printer is attached to the network. A masquerading printer is printer that is implemented as local printers but has a port that refers to a remote machine. From the application perspective these hybrid printers should be viewed as printer connections since that is their intended behavior. LocationData Type: stringAccess Type: Read WriteThe Location property specifies the physical location of the printer. MarkingTechnologyData Type: uint16Access Type: Read Onlyプリンターで使用される印字テクノロジを指定します。 MaxCopiesData Type: uint32Access Type: Read Only単一のジョブでプリンターから印刷できる最大部数です。 MaxNumberUpData Type: uint32Access Type: Read Onlyプリンターが単一のメディア シート上に出力できる印刷ストリームの最大ページ数です。 MaxSizeSupportedData Type: uint32Access Type: Read Onlyプリンターが受け付けるジョブの (バイト ストリームとしての) 最大サイズを指定します (KB)。値 0 は制限が設定されていないことを示します。 MimeTypesSupportedData Type: stringAccess Type: Read Onlyプリンターでサポートされている MIME の種類に関する詳細な情報を提供する自由形式の文字列の配列です。このプロパティにデータが提供されている場合は、値 47 の "Mime" が LanguagesSupported プロパティに含まれていなければなりません。 NameData Type: stringAccess Type: Read OnlyName プロパティは、オブジェクトを認識するためのラベルを定義します。サブクラスでは、Name プロパティは上書きされて Key プロパティになることがあります。 NaturalLanguagesSupportedData Type: stringAccess Type: Read Onlyプリンターで管理情報の出力用に使用される文字列に利用可能な言語を示します。これらの文字列は RFC 1766 に従う必要があります。たとえば、英語は "en" で表されます。 NetworkData Type: booleanAccess Type: Read WriteThe Network property indicates whether the printer is a network printer. PaperSizesSupportedData Type: uint16Access Type: Read Onlyサポートされる用紙の種類を示す整数の配列です。 PaperTypesAvailableData Type: stringAccess Type: Read Onlyプリンターで現在利用可能な用紙の種類を指定する自由形式の文字列の配列です。各文字列は RFC 1759 (Printer MIB) の Appendix C に要約されている ISO/IEC 10175 Document Printing Application (DPA) で指定されている形式で表記されなければなりません。有効な文字列は、たとえば "iso-a4-colored" および "na-10x14-envelope" などです。定義により、PaperTypesAvailable の一覧にある利用可能な用紙のサイズは PaperSizesSupported プロパティにも含まれている必要があります。 ParametersData Type: stringAccess Type: Read WriteThe Parameters property specifies optional parameters for the print processor. PNPDeviceIDData Type: stringAccess Type: Read Only論理デバイスの Win32 プラグ アンド プレイ デバイス ID を示します。例: *PNP030b PortNameData Type: stringAccess Type: Read WriteThe PortName property identifies the ports that can be used to transmit data to the printer. If a printer is connected to more than one port, the names of each port are separated by commas. Under Windows 95, only one port can be specified. PowerManagementCapabilitiesData Type: uint16Access Type: Read Only論理デバイスの具体的な電源関連機能を示します。0="不明"、1="サポートされていません"、および 2="無効" は文字どおりの意味です。3="有効" は、電源管理機能は現在有効であるが、正確な機能セットが不明か、または情報を取得できないことを示します。"自動省電力モード" (4) は、使用状況または他の条件に基づいてデバイスが電源の状態を変更できることを示します。"電源の状態設定可能" (5) は、SetPowerState メソッドがサポートされていることを示します。"電源サイクル サポート" (6) は、SetPowerState メソッドの PowerState 入力変数に 5 ("電源サイクル") を設定して呼び出せることを示します。"時刻指定電源オン サポート" (7) は、SetPowerState メソッドの PowerState 入力変数に 5 ("電源サイクル") を設定し、Time パラメーターに電源オンの具体的な日時または時間間隔を設定して呼び出せることを示します。 PowerManagementSupportedData Type: booleanAccess Type: Read Onlyデバイスの電源管理が可能である (省電力状態に移行できる) ことを示すブール値です。電源管理機能が現在有効であるかどうかや、有効である場合にどの機能がサポートされるかを示す値ではありません。そうした情報については PowerManagementCapabilities 配列を参照する必要があります。このブール値が false の場合、PowerManagementCapabilities 配列には、文字列 "サポートされていません" を示す整数値 1 のエントリだけが含まれます。 PrinterPaperNamesData Type: stringAccess Type: Read OnlyThe PrinterPaperNames property indicates the list of paper sizes supported by the printer. The printer-specified names are used to represent supported paper sizes. PrinterStateData Type: uint32Access Type: Read OnlyThis property has been deprecated in favor of PrinterStatus, DetectedErrorState and ErrorInformation CIM properties that more clearly indicate the state and error status of the printer. The PrinterState property specifies a values indicating one of the possible states relating to this printer. PrinterStatusData Type: uint16Access Type: Read Only論理デバイスの Availability プロパティで指定されたプリンターの状態よりも詳細な情報です。値には "アイドル" (3) およびデバイスが現在印刷中であることを示す (4) が含まれています。 PrintJobDataTypeData Type: stringAccess Type: Read WriteThe PrintJobDataType property indicates the default data type that will be used for a print job. PrintProcessorData Type: stringAccess Type: Read WriteThe PrintProcessor property specifies the name of the print spooler that handles print jobs. PriorityData Type: uint32Access Type: Read WriteThe Priority property specifies the priority of the printer. The jobs on a higher priority printer are scheduled first. PublishedData Type: booleanAccess Type: Read WriteThe Published property indicates whether the printer is published in the network directory service. QueuedData Type: booleanAccess Type: Read WriteThe Queued property indicates whether the printer buffers and queues print jobs. RawOnlyData Type: booleanAccess Type: Read WriteThe RawOnly property indicates whether the printer accepts only raw data to be spooled. SeparatorFileData Type: stringAccess Type: Read WriteThe SeparatorFile property specifies the name of the file used to create a separator page. This page is used to separate print jobs sent to the printer. ServerNameData Type: stringAccess Type: Read OnlyThe ServerName property identifies the server that controls the printer. If this string is NULL, the printer is controlled locally. SharedData Type: booleanAccess Type: Read WriteThe Shared property indicates whether the printer is available as a shared network resource. ShareNameData Type: stringAccess Type: Read WriteThe ShareName property indicates the share name of the Win32 printing device. SpoolEnabledData Type: booleanAccess Type: Read OnlyThe SpoolEnabled property shows whether spooling is enabled for this printer. StartTimeData Type: datetimeAccess Type: Read WriteThe StartTime property specifies the earliest time the printer can print a job (if the printer has been limited to print only at certain times). This value is expressed as time elapsed since 12:00 AM GMT (Greenwich mean time). StatusData Type: stringAccess Type: Read OnlyStatus プロパティはオブジェクトの現在の状態を示す文字列です。操作可能な状態および操作不可能な状態が定義されます。操作可能な状態は、"OK"、"低下" および "障害が発生する可能性あり" です。"障害が発生する可能性あり" は、要素は適切に機能するけれども近いうちに障害が発生する可能性があることを示します。例: SMART 対応ハード ディスク。操作不可能な状態も指定できます。これは、"エラー"、"開始中"、"停止動作中" および "サービス" です。最後の "サービス" には、ディスクがミラーされている間、ユーザーのアクセス許可の一覧を再度読み込む間、または他の管理用作業が行われている間などが該当します。この作業がすべてオンラインで行われるとは限りませんが、[管理要素] は "OK" でも他の状態でもありません。 StatusInfoData Type: uint16Access Type: Read OnlyStatusInfo は、論理デバイスが有効 (値 = 3)、無効 (値 = 4)、その他の状態 (1) または不明な状態 (2) であることを示す文字列です。このプロパティが論理デバイスに適用されない場合は、値 5 ("該当なし") が使用されます。 SystemCreationClassNameData Type: stringAccess Type: Read Onlyスコーピング システムの CreationClassName です。 SystemNameData Type: stringAccess Type: Read Onlyスコーピング システムの名前です。 TimeOfLastResetData Type: datetimeAccess Type: Read Onlyプリンター デバイスの前回のリセットの時刻です。 UntilTimeData Type: datetimeAccess Type: Read WriteThe UntilTime property specifies the latest time the printer can print a job (if the printer has been limited to print only at certain times). This value is expressed as time elapsed since 12:00 AM GMT (Greenwich mean time). VerticalResolutionData Type: uint32Access Type: Read Onlyプリンターの垂直方向の解像度 (ピクセル/インチ) です。 WorkOfflineData Type: booleanAccess Type: Read WriteThe WorkOffline property indicates whether to queue print jobs on the computer if the printer is offline.
メソッド リスト
SetPowerState
SetPowerState は、論理デバイスに対して希望する電源状態と、デバイスをいつその状態にするかを定義します。電源状態は、1="通常の電力"、2="省電力 - 低電力モード"、3="省電力 - スタンバイ"、4="省電力 - その他"、5="電源サイクル" または 6="電源オフ" のいずれかの整数値を PowerState パラメーターに設定することで指定します。Time パラメーターには、(5 の "電源サイクル" を除くすべての状態変更について) 電源状態を設定するときを示す標準の日付時刻値または間隔値 (メソッド呼び出しが受信された時点からの経過時間) を指定します。PowerState パラメーターが 5 の "電源サイクル" の場合、Time パラメーターには、システムをもう一度電源オンにするときを指定します。電源オフは直ちに実行されます。SetPowerState は、成功した場合は 0 を返し、指定した PowerState および要求時間がサポートされていない場合は 1 を返し、その他のエラーが発生した場合は別の値を返します。サブクラスでは、メソッドに ValueMap 修飾子を使用して可能なリターン コードのセットを指定できる場合があります。また、サブクラスでは、ValueMap の内容を '翻訳' した文字列を Values 配列修飾子として指定できる場合があります。 Reset
論理デバイスのリセットを要求します。要求が正常に実行された場合、返される値は 0 で、要求がサポートされない場合は 1 です。また、エラーが発生した場合は他の値となります。 Pause
The Pause method pauses the print queue. No jobs can print anymore until the print queue is resumed. The method can return the following values: Resume
The Resume method resumes a paused print queue. The method can return the following values: CancelAllJobs
The CancelAllJobs method cancels and removes all print jobs from the printer queue including the job currently printing. The method can return the following values: AddPrinterConnection
The AddPrinterConnection method provides a connection to an existing printer on the network and adds it to the list of available printers on the computer system. If successful, applications will be able to use this printer for print jobs. If unsuccessful the printer is not installed. The method can return the following values: RenamePrinter
The RenamePrinter method renames a printer. The method can return the following values: PrintTestPage
The PrintTestPage method prints a test page. The method can return the following values: SetDefaultPrinter
The SetDefaultPrinter method sets the printer to be the default printer for the user who executes the method. The method can return the following values: GetSecurityDescriptor
Retrieves a structural representation of the printer's security descriptor. SetSecurityDescriptor
Sets security descriptor on the printer to the specified structure.
WQL サンプル
SELECT * FROM Win32_Printer
このサイトの情報について
このコンテンツはWMIの各コンポーネントが持っているWin32_Printerクラス情報を参照・抽出しリファレンスとして作成・提供しています。
|
|
ご意見・ご要望・ご感想をこちらのアンケートからお待ちしています |
| ∧ ページの先頭へ… |