1

ネットワーク内の複数のプリンターに関する情報を取得しようとしています。私たちのサーバーでは WMI が許可されていないため、Win32_PrinterDriverWMI クラスConfigFileで取得するのと同じ情報を取得しようとします。DataFileDependentFilesDriverPath

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 でそれを試しました。

私が名前を取得するだけの理由はありますか?または、ここで間違ったクラスを使用していますか?

4

1 に答える 1