RSS

How-To Geek

Have you ever wanted to be able to just hit a hotkey that tells Windows to switch from High Performance down to Power Saver? Sure, you can use the tray icon, but since we like to customize things there’s always another way.

Thanks to our great forum member ScottW for coming up with this idea. He’s always an excellent source of geeky wisdom!

Using the powercfg Command

Windows 7 and Vista come with the powercfg command that you can use from the command prompt, and we’ll have to use this tool to figure out the GUID—the internal ID that Windows uses—for the plan itself.

To find the power scheme GUID, simply open up a command prompt and type in the following:

As you can see in the screenshot, you can use the –setactive argument to actually switch between the plans from the command line, which is how we’ll create the shortcut.

Creating the Shortcut

Next you’ll need to create a shortcut by right-clicking on the desktop and choosing New \ Shortcut.

You’ll want to use the following in the application shortcut, replacing the GUID with your own:

powercfg -setactive <SCHEME_GUID>

Note how it looks in the screenshot… yours should look the same.

Update: Reader Nick points out that you can use /setactive “Name of Profile” instead of the GUID as an alternate option.

You can repeat the same thing to create another shortcut for one of the other power plans.

Customize the Shortcut

Now that we have some fancy shortcuts, you can make them look better by tweaking the icon, and then assign a shortcut key. There are a number of really great icons in the following Windows DLL file:

C:\Windows\System32\powercpl.dll

And you can assign a shortcut key to switch power schemes on the fly.

Once you’re all done, you should have two new icons, ready to use!

If you wanted to get really geeky, you can use the start menu search box or Launchy to switch the schemes from the keyboard.

Alternate: Use the Mobility Center

As reader borja points out in the comments, you can use the Win+X shortcut key combination to bring up the Mobility Center and quickly switch the power management mode—although it’s not going to really be any quicker than using the tray icon, but still a useful tool!

First of all, let me thank you for all the great tips, I’m so glad I subscribed.

As a programmer I often have to switch between normal mode (i.e. power saver) and a high performance mode when I am doing stability runs of a program. I love this feature, but it would be even more perfect if it would also enable/disable the screen saver. Lastly, would it be possible to indicate (icon) what mode is active?

PS: I realize this is all easy with a bit of programming, but frankly I have too much fun doing it without writing a single line of code :)

You could use the Task Scheduler to schedule this command and have the “High Performance” plan during the day and “Power Saver” plan at night. This would save power if you leave your PC on at night and give you benefits during the day!

powercfg -setactive “plan name” doesn’t work for me in Win7 RC. Looking at the command line options as described at TechNet and from powercfg /?, there is no mention of a possible friendly name substitution for the power scheme GUID. Here is the TechNet article for Vista:http://technet.microsoft.com/en-us/library/cc748940.aspx

Can anyone else confirm that powercfg -setactive “plan name” works for them in Vista or 7?

I just wanted to leave a comment describing how I made this look really, really good. I highly recommend anyone who did the above, read the below. And thank them too. :-)

I made three shortcuts – Power Saver.lnk, Balanced.lnk, and High Performance.lnk. I customized their icons from the properties dialog to use the wireless signal indicators (sets of two-to-five green bars), which are located in the file C:/Windows/System32/mblctr.exe – there are four to choose from and on a machine with no wireless icons visible or in use, they really suit these power-plan shortcuts. I looked in System32 forever to find ones that did. :D

So I put them in a folder I made: C:/Users/[Adam]/AppData/Roaming/Microsoft/Windows/[Power Plans/], which you can name anything you like. But this is the most logical place in a Windows Vista installation for these shortcuts.

The last step is to navigate a new window to Control Panel, make sure you are in classic view. Right click the Power Options icon and select “Create Shortcut.” It appears on the desktop, name it whatever you like. Place it in the folder with the power-plan shortcuts.

Now I listed this folder as a toolbar on my taskbar, and unlocked the taskbar. Make the toolbar as short as possible so that only the name of the folder and a pair of arrows appear. Drag the very last shortcut we created, the one to “Control Panel/Power Options” to the top of the list in our toolbar so it appears above all the specific shortcuts to each plan. Right click the dots which appear to the left of your new toolbar after unlocking it; you can deselect “Show Text” and “Show Title.” Now they will be replaced by the topmost icon, which opens the Power Options dialog. The arrows show the plans, which you can drag into your preferred order. It’s like it was meant to be. :-)

No matter which way I do this, I can’t make it work (Windows 7 Pro). If I try any of the none-GUID options it doesn’t do anything when the shortcuts are used, and I can’t run the command to access the GUIDs – it flashes up for like a second then disappears! Any ideas, I’m flummoxed?!

TO ANSWER “Caz13”
question:No matter which way I do this, I can’t make it work (Windows 7 Pro). If I try any of the none-GUID options it doesn’t do anything when the shortcuts are used, and I can’t run the command to access the GUIDs – it flashes up for like a second then disappears! Any ideas, I’m flummoxed?!
—————————————————————————————————————————————————-
ANSWER= goto Run then type cmd and hit enter (CMD is the Command Prompt).
A window will open to a text prompt now type in “powercfg –list”
Then RIGHT CLICK the top of the window where the path ( c:windows\system32\cmd.exe) shows
Select the “EDIT” arrow and select all via paste to a new text document for fast copy and paste of the numbers you need.

Thanks for the great tips, in both article and comments. I’ve now written an autoit macro by which I can switch power plans quickly. The scheduler idea is great too, but currently I shut down the machine at night anyway.