Wednesday, April 13, 2011

Windows7 Tips


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.



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



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.

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.


Related Posts Plugin for WordPress, Blogger...

Search This Blog

Followers

Twitter Delicious Facebook Digg Stumbleupon Favorites More