Enable/Disable Hardware Device (Device Manager) programatically

G

Guest

Hi All,

Problem Definition:
---------------------
Microsoft Wirelss Keyboard works in BIOS but does not work when booting into
windows.

Discovered Work-around:
-----------------------------
1.> Open Device Manager(The keyboard device will have an exclamation and
will read:"Could not start")
2.> Right-click on the device and select disable.
3.> While hammering and button on the keyboard >> Right click the keyboard
icon
4.> Click on enable

The device works like this

Suggestions Required:
--------------------------

How can i perfom this process programtically to save the user the hassle?

Any code on how to enable/disable a device will be appreciated!

Thanx

Johann
 
I

Ignacio Machin \( .NET/ C# MVP \)

HI,

The easiest way is to simply buy a new keyboard :) , there is something
wrong with the one you have now.

regarding the device managers handling you should look into WMI
 
G

Guest

Hi Ignacio,

Thank you fopr your speedy reply! The keyboard works fine with other
systems, it is one of those unlisted hardware incompatibilites. The keyboard
also has other problems like the CTRL key not working for multiple
selections/timing out(Can be resolved by positioning the keyboard closer to
the receiver than the mouse).

I did start exploring the WMI route and System32_Keyboard API rather limited
with regards to functional calls.

I'm still looking for some code to enable/disable a hardware deive.

Kind Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top