469,579 Members | 1,157 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Enumerating devices: disabled devices not shown

I am using the following code to enumerate devices on the local

ManagementObjectSearcher searcher = new
ManagementObjectSearcher("SELECT * from Win32_PnPEntity");
ManagementObjectCollection devices = searcher.Get();

foreach (ManagementObject device in devices)
It only shows enabled devices. If I disable the LPT printer port (using
the Windows XP device manager GUI), it no longers is in the query
How can I get the query to return all devices, enabled and disabled?

This leads to the next question: how can I enable or disable devices
from the .Net framework?

May 4 '06 #1
0 1581

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by C Chang | last post: by
1 post views Thread by Kruse | last post: by
7 posts views Thread by Helmut Giese | last post: by
14 posts views Thread by Lane Straatman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.