开发者

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

开发者 https://www.devze.com 2023-04-11 19:11 出处:网络
I\'d like to use WMI to figure out what power management capabilities my computers have. Can they sleep? Can they hibernate? etc.

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

精彩评论

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