I am writing a metro application for Windows 8 (C # 5) to act as a power management application that allows the user to turn on and off various devices that computers will likely have. So far, I'm just thinking about Bluetooth and a wireless network adapter. In the end, I will add other devices, but one step at a time.
The main aspects I'm worried about are the reliable detection of devices, turning them on and off, and asking for their status (is this device already on?). I need to be able to do any of these on different machines with different devices, including several NIC or Bluetooth hardware settings.
I looked at devcon on Win7, but I'm worried about reliable device discovery. If I capture the wrong devices, who knows that I will disconnect, not to mention that it will not disconnect what I intend to disconnect. In addition, I have not tried this on Win8 yet, and it may not be a portable application, I do not want people to install it, and then my application.
WMI is powerful, but always a little intimidating to roam without the slightest guidance. If it were better, I would appreciate some resources.
The command line or .Net library is what I hope for, but I have not tried such things before, so I am open to any other alternatives. In addition, any forethought in working with other devices, such as cellular network cards or devices that I have not thought about, would be great.
source share