ネットワーク内の複数のプリンターに関する情報を取得しようとしています。私たちのサーバーでは WMI が許可されていないため、Win32_PrinterDriver
WMI クラスConfigFile
で取得するのと同じ情報を取得しようとします。DataFile
DependentFiles
DriverPath
PrintServer ps = new PrintServer(serverName);
PrintQueueCollection printQueueCollection = ps.GetPrintQueues();
foreach (PrintQueue pq in printQueueCollection)
{
foreach (DictionaryEntry prop in pq.QueueDriver.PropertiesCollection)
{
// add props to Dictionary/Print out or sth else
}
...
ただし、取得したコレクションにはプロパティpq.QueueDriver.PropertiesCollection
しかありません。Name
今のところ、119 の異なる PrintQueues でそれを試しました。
私が名前を取得するだけの理由はありますか?または、ここで間違ったクラスを使用していますか?