How do I disable a system device? [duplicate]

To futher Mel Green’s answer, the hardware helper library uses interop to call the Windows API (setupapi), specifically the SetupDiSetClassInstallParams method. Of course there are other calls here which are used to look up the device details etc.

One thing to consider that if you are running as a standard user or unprivileged account you will not be able to use this to control (enable/disable etc) hardware devices.

For more details have a look at http://www.pinvoke.net (and for the specific call: http://pinvoke.net/default.aspx/setupapi.SetupDiSetClassInstallParam )

Leave a Comment