WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Get Current Power Scheme


Question:

Anybody knows how to retrieve the default(current) power scheme ?

Answer:

Here is some code that reads the information from the registry:
numCurrentPowerPolicy = RegQueryValue( @RegCurrent, "Control Panel\PowerCfg[CurrentPowerPolicy]" )
strCurrentPowerPolicy = RegQueryValue( @RegCurrent, "Control Panel\PowerCfg\PowerPolicies\":numCurrentPowerPolicy:"[Name]" )
Message( "Current Power Policy", strCurrentPowerPolicy )

Article ID:   W17420
File Created: 2008:04:10:15:09:42
Last Updated: 2008:04:10:15:09:42