Subscribe to How-To Geek

Create a Shortcut or Hotkey to Switch Power Plans

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.

 Power Icons

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:

powercfg –list

This should leave you with a list of the power plans you have assigned on your system, and the appropriate GUID for each. If you’ve read our handy guide to copying to the clipboard from the command prompt, it’s an easy task to copy the GUID for later.

powercfg Command Prompt

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.

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.

Create Shortcut

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

Customize Icon

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

Add Shortcut Key

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

Sweet, Icons!

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!

image

| More
This article was originally written on 06/11/09 Tagged with: Shortcuts and Hotkeys, Vista Tips & Tweaks, Windows 7, Windows Vista

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:

Comments (12)

  1. one too many

    So it is possible to write short cmd commands in shortcut location?

  2. ramfree17

    If the Vista/Win7 version of the powercfg only operates on GUID then it is a step back as the XP version allows the usage of the human-friendly name, or the numerical id if you use the /n switch.

    ciao!

  3. borja

    Nice tip!.
    In win7, you can use “windows key+x” to switch power plans quickly.

  4. Mike Versteeg

    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 :)

  5. Nick Staroba

    You can also use the command like this:

    powercfg.exe /setactive “Name of profile”

    Works for me :)

  6. Karthik

    Thanks! I have always wanted to have a keyboard shortcut for power mode switch.

    Also… I did not know about Win+X combination. Thanks to Borja

  7. Robert Lambrecht

    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!

  8. ScottW

    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/e.....48940.aspx

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

  9. ScottW

    Aha! Here are the user-friendly names of the power schemes in the list of aliases:

    >powercfg -aliases

    a1841308-3541-4fab-bc81-f71556f20b4a SCHEME_MAX
    8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c SCHEME_MIN
    381b4222-f694-41f0-9685-ff5bb260df2e SCHEME_BALANCED

    So the following commands are valid, and test out on my Win 7 RC install:

    > powercfg -setactive SCHEME_MAX
    > powercfg -setactive SCHEME_BALANCED
    > powercfg -setactive SCHEME_MIN

  10. mmhmm

    um, has anyone noticed that this doesnt work after the first time you do it?
    or maybe its just me . . .

  11. Drewsky

    I get “The file…powercfg.exe contains no icons” message when I try to change the icon. Running Vista Business. Anyone else get that?

  12. Adam L

    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. :-)


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Our Friends
Getting Started


About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
conhost.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.