Tuesday, March 1, 2011

WMI Class for wireless mouse

What is the WMI class to get information about Wireless mouse?

EDIT: How do I distinguish USB mouse from Wireless mouse(Connected via USB Doggle). DeviceInterface value from Win32_PointingDevice class shows as 162 for both because both are connected via USB. But I want to distinguish between these mouses.

From stackoverflow
  • As long as it is registered as a mouse, it should be in the Win32_PointingDevice class, which is under the CIMV2 WMI namespace.

    Get the free Microsoft WMI Code Creator tool to browse the classes and their properties, you can also generate code and execute methods on the classes, really useful for any kind of WMI stuff.

    kingas : Thanks! Now here is extension to my question. How do I distinguish USB mouse from Wireless mouse. DeviceInterface value from Win32_PointingDevice class shows as 162 for both. But I want to distinguish between these mouses. Could you provide info on this.
    Dale Halliwell : If you know the name of the wireless mouse (e.g. "Microsoft Wireless Notebook Mouse 3000"), then you can identify which one it is by the Name property, same goes for the DeviceID. But that doesn't help you if you don't know the name in advance. I don't think there is any other way to differentiate between an arbitrary wireless mouse and a wired mouse if they are both running on USB ports (162 is the DeviceInterface code for USB) without checking against a whitelist of known wireless mouse DeviceIDs.
    kingas : Thanks. I think I am okay with Wirless and USB directly connected moice. I ran my code in another machine which has touch screen. Now my discovery showing 3 mice. Directly connected USB mouse, wireless mouse and touch screen. I need to distinguish between USB mouse with touch scree now. I am posting another question on this.

0 comments:

Post a Comment