WMI Fun !! 〜 WMIに興味がある方・システム管理者必見!! 〜
 WMI Step|WMI Sample|WMI Reference|WMI Library|My Let'snote|Personal|Link|About WMI Fun !!

WMI Fun !! > WMI Library > Win32_PrintJob クラス

Panasonic Let'snoteを長年愛用しています、その理由はMy Let'snoteで…
インクを買うよりもしかしたら安い?インクジェット複合機HP Photosmart 5510
白いご飯や日本酒にもとても合うにしんのきりこみがマイブームです

Win32_PrintJob クラス - WMI Library

Win32_PrintJob クラスの説明

CIM_Job は、印刷ジョブなどのシステムの作業単位を表す論理要素です。ジョブがスケジュールされるプロセスには含まれないジョブです。
WMI Providerは、CIMWin32です。
UUIDは、{8502C4DF-5FBB-11D2-AAC1-006008C78BC7}です。


プロパティ リスト

Caption

Data Type: string
Access Type: Read Only

Caption プロパティは、オブジェクトを短いテキスト (1 行の文字列) で表した説明です。



Color

Data Type: string
Access Type: Read Only

The Color property indicates whether the document is to be printed in color or monochrome. Some color printers have the capability to print using true black instead of a combination of Yellow, Cyan, and Magenta. This usually creates darker and sharper text for documents. This option is only useful for color printers that support true black printing.



DataType

Data Type: string
Access Type: Read Only

The DataType property indicates the format of the data for this print job. This instructs the printer driver to eithertranslate the data (generic text, PostScript, or PCL) before printing, or to print in a raw format (for graphics and pictures).
Example: TEXT



Description

Data Type: string
Access Type: Read Only

Description プロパティは、オブジェクトの説明を提供します。



Document

Data Type: string
Access Type: Read Only

The Document property specifies the name of the print job. The user sees this name when viewing documents waiting to be printed.
Example: Microsoft Word - Review.doc



DriverName

Data Type: string
Access Type: Read Only

The DriverName property indicates the name of the printer driver used for the print job.



ElapsedTime

Data Type: datetime
Access Type: Read Only

ジョブが実行されている時間の長さです。



HostPrintQueue

Data Type: string
Access Type: Read Only

The HostPrintQueue property contains the name of the computer on which the print job was created.



InstallDate

Data Type: datetime
Access Type: Read Only

InstallDate プロパティは、オブジェクトがいつインストールされたかを示す datetime 値です。値がなくても、オブジェクトがインストールされていないことを示すわけではありません。



JobId

Data Type: uint32
Access Type: Read Only

The JobId property indicates the identifier number of the job. It is used by other methods as a handle to a single job spooling to the printer.



JobStatus

Data Type: string
Access Type: Read Only

ジョブの状態を表す自由形式の文字列です。



Name

Data Type: string
Access Type: Read Only

Name プロパティは、オブジェクトを認識するためのラベルを定義します。サブクラスでは、Name プロパティは上書きされて Key プロパティになることがあります。



Notify

Data Type: string
Access Type: Read Only

User to be notified upon job completion or failure. This property is restricted to 16 characters under Windows 9x platforms.



Owner

Data Type: string
Access Type: Read Only

ジョブを送信したユーザーです。



PagesPrinted

Data Type: uint32
Access Type: Read Only

The PagesPrinted property specifies the number of pages that have been printed. This value may be zero if the print job does not contain page delimiting information.



PaperLength

Data Type: uint32
Access Type: Read Only

The PaperLength property indicates the length of the paper.
Example: 2794



PaperSize

Data Type: string
Access Type: Read Only

The PaperSize property indicates the size of the paper.
Example: A4 or Letter



PaperWidth

Data Type: uint32
Access Type: Read Only

The PaperWidth property indicates the width of the paper.
Example: 2159



Parameters

Data Type: string
Access Type: Read Only

The Parameters property indicates optional parameters to send to the print processor. See the PrintProcessor member for more information.



PrintProcessor

Data Type: string
Access Type: Read Only

The PrintProcessor property indicates the print processor service used to process the print job. A printer processor works in conjunction with the printer driver to provide additional translation of printer data for the printer, and can also be used to provide special options such as a title page for the job.



Priority

Data Type: uint32
Access Type: Read Only

優先順位は、ジョブ実行の緊急性または重要性を示します。



Size

Data Type: uint32
Access Type: Read Only

The Size property indicates the size of the print job.



SizeHigh

Data Type: uint32
Access Type: Read Only

The SizeHigh property indicates the size of the print job if the Size property exceeds 4,294,967,295 bytes.



StartTime

Data Type: datetime
Access Type: Read Only

ジョブを開始した時間です。



Status

Data Type: string
Access Type: Read Only

Status プロパティはオブジェクトの現在の状態を示す文字列です。操作可能な状態および操作不可能な状態が定義されます。操作可能な状態は、"OK"、"低下" および "障害が発生する可能性あり" です。"障害が発生する可能性あり" は、要素は適切に機能するけれども近いうちに障害が発生する可能性があることを示します。例: SMART 対応ハード ディスク。操作不可能な状態も指定できます。これは、"エラー"、"開始中"、"停止動作中" および "サービス" です。最後の "サービス" には、ディスクがミラーされている間、ユーザーのアクセス許可の一覧を再度読み込む間、または他の管理用作業が行われている間などが該当します。この作業がすべてオンラインで行われるとは限りませんが、[管理要素] は "OK" でも他の状態でもありません。



StatusMask

Data Type: uint32
Access Type: Read Only

The StatusMask property specifies a bitmap of the possible statuses relating to this print job.



TimeSubmitted

Data Type: datetime
Access Type: Read Only

ジョブを送信した時刻です。



TotalPages

Data Type: uint32
Access Type: Read Only

The TotalPages property specifies the number of pages required to complete the job. This value may be zero if the print job does not contain page-delimiting information.



UntilTime

Data Type: datetime
Access Type: Read Only

ジョブが無効または停止する時刻です。




メソッド リスト

Pause

The Pause method pauses a job in a print queue. If the job was currently printing, no other job will be printed. If the job wasn't printing yet, another unpaused print job may begin printing. The method can return the following values:
0 - Success.
5 - Access denied.
Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes.


Resume

The Resume method continues a paused print job. The method can return the following values:
0 - Success.
5 - Access denied.
Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes.



WQL サンプル

SELECT * FROM Win32_PrintJob

VB6/VBS
SWbemServicesクラスのExecQueryメソッドからWQLを実行可能です。
Set PrcSet = Service.ExecQuery("SELECT * FROM Win32_PrintJob")

VB.Net
ObjectQueryクラスのQueryStringプロパティにWQLを設定し、ManagementObjectSearcherクラスのGetメソッドからWQLを実行可能です。
Searcher.Query.QueryString = "SELECT * FROM Win32_PrintJob"
PrcSrc = Searcher.Get

PowerShell
Get-WmiObjectコマンドレットのqueryオプションを指定しWQLを実行可能です。
Get-WmiObject -query "SELECT * FROM Win32_PrintJob"


このサイトの情報について

このコンテンツはWMIの各コンポーネントが持っているWin32_PrintJobクラス情報を参照・抽出しリファレンスとして作成・提供しています。
参照したWMIの名前空間はroot/CIMV2、書き出し環境はWindows Server 2008 R2になります。

WMIの使い方(VB6, VBS, VBA, VB.NET, VC#, PowerShellを対象)に関してはWMI Stepも参考にしてみてください。(WMI初心者・入門編としてもおすすめです。) 各種言語を使用したWMIを使用するたたき台としてソーステンプレートも公開しています。プログラム/スクリプト作成時に役立てば…と思っています。

今後各WMI ClassをサポートしているOSの種類を掲載する予定です。
予定OS: Windows XP/Windows Vista/Windows 7/Windows Server 2003/Windows Server 2003 R2/Windows Server 2008/Windows Server 2008 R2


ご意見・ご要望・ご感想をこちらのアンケートからお待ちしています
WMIに関して調べているけど探し物が見つからない…という方はSearch Resultから検索してみましょう!!

MCP(Microsoft Certified Professional)一応MCP(Microsoft Certified Professional)、MCA(Microsoft Certified Associate)所有してたりします…

- WMI Fun !! -
http://www.wmifun.net/
Microsoft社のテクノロジーであるWMI(Windows Management Instrumentation)の使い方を
Visual Basicを使ってのんびり公開しています
WMIはVB/VBAや.Net(VB,C#)以外でもWMICやWSH(VBS,JS)・PowerShellなどスクリプト言語からも使えますよ!
Windowsベースの社内ITシステムに関する資産管理、アセットマネジメントや監視業務の効率化、
インベントリ情報収集系システムツール開発にWMIはお勧めです

This website is created by Toh.
Copyright(C) 1997-2012 WMI Fun !!. All rights reserved.
WMI Fun !!へのリンクはご自由に…相互リンクに関するお問い合わせはアンケートページからお願いします。

∧ ページの先頭へ…