Disabling hardware or services using WMI

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ChrisC

    Disabling hardware or services using WMI

    Im having some trouble disabling hardware using WMI. I got a handle on
    the device, but when I call SetPowerState I get a type mismatch. The
    definition of the method says it takes an int (power level), datetime
    (when to do it)


    objNetCard.SetP owerState(6, Convert.ToDateT ime(Now()))


    :(


    Seeing as that wasnt going anywhere I tried stopping the service for
    the driver using StopService - but this returns 4, which apparently
    means Invalid service control.... but ive got no idea what that really
    means or how to fix it.


    Help!

Working...