Mutiara Kata

Orang yang bahagia itu akan selalu menyediakan waktu untuk membaca kerana membaca itu sumber hikmah menyediakan waktu tertawa kerana tertawa itu muziknya jiwa, menyediakan waktu untuk berfikir kerana berfikir itu pokok kemajuan, menyediakan waktu untuk beramal kerana beramal itu pangkal kejayaan, menyediakan waktu untuk bersenda kerana bersenda itu akan membuat muda selalu dan menyediakan waktu beribadat kerana beribadat itu adalah ibu dari segala ketenangan jiwa.

Thursday, February 14, 2013

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

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!

No comments:

Post a Comment

Komen la apa yang patut. Kalau suka "LIKE". Thanx

~This Page Best view with Firefox n Chrome~