开发者

How to retrieve computer's power management capabilities through WMI?

I'd like to use WMI to figure out what power management capabilities my computers have. Can they sleep? Can they hibernate? etc.

There is a PowerManagementCapabilities field which seems to promise all that. The only problem is that it's NULL of everything.

Is there any other way? Is my environment special in some way that everything is null.开发者_StackOverflow中文版 According to the documentation, NULL doesn't even seem like a possible value.


Not all WMI classes are implemented by all hardware.

As an alternative, you could always parse the output of powercfg -a

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜