I try to get information about several printers in our network. Because WMI isn't allowed on our server I try to get the same information I would get with the Win32_PrinterDriver
WMI-class e.g. ConfigFile
, DataFile
, DependentFiles
, DriverPath
and so on (at best all properties I can get via WMI).
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
}
...
However the Collection I get with pq.QueueDriver.PropertiesCollection
has only the Name
property. I've tried that on 119 different PrintQueues for now.
Is there a reason why I just get the name? Or am I using the wrong class here?