This is a repost of something I wrote three years ago. I thought it was worth a revisit.

<—————————————————————————————————————->

This idea came from a technet article about changing power schemes in Windows 7.

I got rather sick of choosing plans from the systray (notification area). I found it a little clumsy and clunky trying to manage it with a trackpad or mouse all the time. Besides that, I will jump at just about any chance or excuse to make something like that happen from the keyboard instead.

If you do this at a cmd prompt:

powercfg -l

it will list all the plans that are available. Usually it will be three, unless you've made some of your own, which is what I did.

You'll get an output that looks a bit like this:


Existing Power Schemes (* Active)
—————————————————-
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced) *
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)


What you're after is the GUID part (the Globally Unique Identifier)

If you want to change over to High Performance at the command line, from Run, from a batch file, from AHK, or from your favorite launcher— SlickRun, Launchy etc— then make a command like the following, the target for whatever shorthand you prefer to use.

powercfg -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

E.g. In SlickRun, I run these sorts of commands in the form of "Magic Words".

"powercfg" goes in the Filename or Url field. No quotes.

and

-s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

is placed in the Parameters field.

In this way, quick commands can be created for any power scheme you like, only using different GUIDs (as shown in whatever "Powercfg -l" gives you for output. I'm guessing that the three default plans use the same GUIDs for everyone.

You could also pin shortcuts to all your power schemes on the Start menu or Taskbar or the Desktop, or Quick Launch. But now we're slowly getting back into mouse country and I'm trying to avoid that.

However, in case you're not, then you could do something like this:

Right-click an empty spot on the Desktop and create a new shortcut with this for a target. (It's the Balanced scheme, btw)

powercfg.exe -s 381b4222-f694-s41f0-9685-ff5bb260df2e

Do the others too, if you want. From the Desktop, you can change their icons and pin them to the Start Menu or the Taskbar, or you could move/copy them over to Quick Launch. Choices choices.

Not enough? There's always the ahk way. A shortcut like the one above can be launched with a line like this in an ahk script:

#Numpad6::Run, powercfg -s a1841308-3541-4fab-bc81-f71556f20b4a

^^ That uses the combo, Win key and the number 6 on the numeric keypad to set Windows to the Power Saver scheme.

Hope you like. Hope I explained well enough.

PS
The TechNet article is
"Manage Windows 7 Power Options from the Command Line"

http://technet.microsoft.com/en-us/magazine…