Solved View/Change Power Plan via Registry?

kornfan71

New member
Local time
9:44 PM
Messages
27
Hello all,
I'm working on a little Visual Basic .NET program that simply changes the power plan based upon the AC power status and battery percentage status (something that Windows 7 should already do...:rolleyes:)
Anyway, it's coming along well enough, except that I need to have my program run the 'powercfg' command line utility to change plans. I have yet to find a way for my program to determine which plan is in use.
Is there a registry key that changes the current power plan or something similar, or do I need to play around with grabbing outputs from the command line?

Thanks in advance!
 

My Computer My Computer

OS
Windows 7 Home Premium x64
CPU
AMD Phenom II X4 955 BE @ 3.8 GHz
Motherboard
Gigabyte GA-890FXA-UD5
Memory
G.Skill Pi 2x2GB DDR3-1600 @ 6-7-6-20-1T
Graphics Card(s)
Gigabyte NVIDIA GeForce GTX 470
Sound Card
SB Audigy 2 and Realtek on-board
Monitor(s) Displays
LG 21.5" W2253TQ
Screen Resolution
1920x1080
Hard Drives
OCZ Vertex 2 120GB --
Seagate 7200.12 500GB --
Seagate 7200.7 120GB
PSU
Thermaltake 750W W0229RU
Case
Cooler Master Storm Sniper Black Edition
Cooling
Tuniq Tower 120 Extreme
Keyboard
Logitech G110
Mouse
Logitech G500
You can find which is the current plan here:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\Default\PowerSchemes]
"ActivePowerScheme"="381b4222-f694-41f0-9685-ff5bb260df2e"

For the description:

D:\Windows\System32>REG QUERY HKLM\SYSTEM\CurrentControlSet\Control\Power\User\D
efault\PowerSchemes\381b4222-f694-41f0-9685-ff5bb260df2e

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\Default\PowerSche
mes\381b4222-f694-41f0-9685-ff5bb260df2e
Description REG_EXPAND_SZ @%SystemRoot%\system32\powrprof.dll,-14,Auto
matically balances performance with energy consumption on capable hardware.
FriendlyName REG_EXPAND_SZ @%SystemRoot%\system32\powrprof.dll,-15,Bal
anced (recommended)
 

My Computers My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
GAH!

Thank you!!! :D
This is going to be a whole lot easier now!

(I can't believe I didn't see that...)
 

My Computer My Computer

OS
Windows 7 Home Premium x64
CPU
AMD Phenom II X4 955 BE @ 3.8 GHz
Motherboard
Gigabyte GA-890FXA-UD5
Memory
G.Skill Pi 2x2GB DDR3-1600 @ 6-7-6-20-1T
Graphics Card(s)
Gigabyte NVIDIA GeForce GTX 470
Sound Card
SB Audigy 2 and Realtek on-board
Monitor(s) Displays
LG 21.5" W2253TQ
Screen Resolution
1920x1080
Hard Drives
OCZ Vertex 2 120GB --
Seagate 7200.12 500GB --
Seagate 7200.7 120GB
PSU
Thermaltake 750W W0229RU
Case
Cooler Master Storm Sniper Black Edition
Cooling
Tuniq Tower 120 Extreme
Keyboard
Logitech G110
Mouse
Logitech G500
You're welcome.:D
 

My Computers My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Back
Top