MaxPowerLauncher, the simple way to temporarily boost your Windows Power Plan to Max, just for particularly power hungry applications

Posted by Paul Braren on Dec 30 2012 in
  • Efficiency
  • HowTo
  • Windows
  • There are a few applications and emulators that suffer a noticeable performance impact when you leave the Windows 7 or Windows 8 Power Plan at the default "Balanced" setting.

    I use a simple way to change my power profile to "High performance" for just such applications, automatically returning the tablet to "Balanced" mode when done. This is how we avoid accidentally leaving the family's yZilla (Lenovo Yoga) in the maximum battery power-draining mode after some gaming, for example.

    My method uses a simple, free capability that Windows already has built-in from the beginning: the good old batch file.

    Basically, a built-into-Windows command called POWERCFG is used to change your Power Plan to "High performance" known as SCHEME_MAX, then starts your application. When you close your application is closed, this script returns your Power Plan to "Balanced" mode. Then closes itself. That's the gist of it.

    While these scripts were only tested on Windows 8, it's likely they'll work on Windows 7 as well, described here. The GUID (unique identifier) I used was to get around some zaniness with power profile naming (seen in the video), and is the same for Windows 7. You'll also learn that I'm not really a programmer, meaning you don't need to be either. You too can get cool things done with a bit scripting. This script is just a bunch of commands you'd normally have to type in sequence, now automated with a simple double-mouse-click. Peeking at what's inside the minimized window, you'll see the whole script looks like this when it's finished doing its thing:

    maxpowerlauncher-running

    MaxPowerLaunch "Installation":

    Just perform the following steps to "install" this script onto your Windows 8 system

    1. Copy the MaxPowerLauncher lines of text (below) into your clipboard,
      or use right-click and save the downloadable version here, then skip ahead to step 5 below
    2. Open a text editor, Notepad will do nicely
    3. Paste the code into the editor
    4. Save this text file as MaxPowerLauncher.cmd
    5. Edit the saved file, tweaking the 3 lines that actually launch the program you wish to "boost", then save changes and exit the editor
    6. Right-click and drag this saved file to your desktop or a folder somewhere, and answer that you wish to "Create shortcut here"
    7. Right-click on the properties of this new shortcut, and change to "Run: Minimized":
      Start-Shortcut-Minimized
    8. On this same Properties screen, you can use the "Change Icon..." button if you wish
    9. On the "General" tab, you may wish to change the name of the shortcut to something that makes sense to you
    10. Double-click on this icon to launch the script, which will run in a minimized command window until you close the application you've launched

    MaxPowerLauncher will work for most applications, and is easy to test and customize, ready for cut-and-paste below.

    Also available for download (right-click, Save link as / Save target as) at:
    bit.ly/MaxPowerLauncher

    ::MaxPowerLauncher Dec 30 2012 Version
    ::A simple script to adjust power profiles for a particular program.
    ::Contact author at https://tinkertry.com/contact for feedback.
    ::Choice commands used are a simple pause mechanism,
    ::the 3 pauses of 5 seconds in example below can be changed to suit your needs.
    ::CPU-Z used for this example, to help determine proper function.
    ::http://www.ozone3d.net/benchmarks/fur/
    ::http://www.cpuid.com/softwares/cpu-z.html
    ::Full description and walk-through of functional available on YouTube
    ::http://youtu.be/aNQ3ipqg9SQ
    @echo ===================================
    @echo Set Power to “Maximum Performance”
    @echo ===================================
    POWERCFG -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
    POWERCFG -getactivescheme
    @echo\
    @choice /n /d y /t 5 > nul
    @echo\
    @echo ===================================
    @echo Launch yourprogram
    @echo -leave this window running-
    @echo ===================================
    ::replace below 3 lines with the drive, path, and path+file name of your application
    C:
    cd “C:\Program Files\CPUID\CPU-Z”
    “C:\Program Files\CPUID\CPU-Z\cpuz.exe”
    @echo\
    @echo ===================================
    @echo Set Power back to “Balanced”
    @echo ===================================
    POWERCFG -setactive 381b4222-f694-41f0-9685-ff5bb260df2e
    POWERCFG -getactivescheme
    @choice /n /d y /t 5 > nul
    @echo\
    @echo ===================================
    @echo Script will exit in 5 seconds
    @echo ===================================
    @choice /n /d y /t 5 > nul
    ::EXIT doesn’t always seem to work, so killing this cmd.exe process to close window
    taskkill /F /T /IM cmd.exe

    Here's the meat and potatoes, the 3 lines that really count, just to demonstrate how little coding was actually required:

    POWERCFG -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
    “C:\Program Files\CPUID\CPU-Z\cpuz.exe”
    POWERCFG -setactive 381b4222-f694-41f0-9685-ff5bb260df2e
    EXIT

    Finally, the simple and short walk-through video, where you'll see me download the script, create a shortcut, customize the shortcut name and icon, then launch and test:

    Here's a detailed video walk-through of me developing and testing and re-testing this script, if you're just curious about why my script is the way it is:


    Sources:

    sourcedaddy.com/windows-7/configuring-power-management-settings-using-powercfg-utility.html
    serverfault.com/questions/94212/does-cpu-power-management-affect-server-performance
    www.cpuid.com/softwares/cpu-z.html
    www.ozone3d.net/benchmarks/fursupport.microsoft.com/kb/935799