Q:

How to get status of HP Scanner 5590 Flatbed in c#.net?

I have HP Scanner Scanjet 5590 attached to my system. I want to know the status of the scanner via c#.net. How to do it? The status are :
on/off,
idle,
scanning,
etc..
Update: Also I have tried using WMI but it is not detecting it. In the control panel of Win-7 the scanner is shown under the head DEVICES and not under the head PRINTERS.
Kindly help.

A:

u can use WMI to get information like this. See this post How to get Printer Info in .NET? as a reference.
Update:
Try to search for PnP entities:
            ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from Win32_PnPEntity");
            ManagementObjectCollection coll = searcher.Get();

            foreach (ManagementObject any in coll)
            {
                   // Check for device name
            }

This should give you a list of all devices.

