It is currently May 3rd, 2024, 5:55 am

Changing Power Modes Within Rainmeter

Get help with creating, editing & fixing problems with skins
LiKWiDCAKE
Posts: 3
Joined: October 9th, 2012, 3:27 pm

Changing Power Modes Within Rainmeter

Post by LiKWiDCAKE »

Ok, so I am trying to get one icon to switch my laptop to power saver mode, and another to switch it to high performance.
If you enter "powercfg.exe /setactive a1841308-3541-4fab-bc81-f71556f20b4a" into command prompt, it switches you to saver, while "powercfg.exe /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" sets you to high performance. Powercfg.exe is located in C:\Windows\System32, so I've been using that in Rainmeter.

I've tried many ways of making it work, but in general, Rainmeter will run "C:\Windows\System32\powercfg.exe" (it brings up a box that quickly closes), but as soon as I try to add the parameter, it doesn't work, whether by
"C:\Windows\System32\powercfg.exe /setactive a1841308-3541-4fab-bc81-f71556f20b4a"

or

"C:\Windows\System32\powercfg.exe" "setactive a1841308-3541-4fab-bc81-f71556f20b4a"

or anything else I've tried. Any suggestions?
LiKWiDCAKE
Posts: 3
Joined: October 9th, 2012, 3:27 pm

Re: Changing Power Modes Within Rainmeter

Post by LiKWiDCAKE »

Oh, I also tried having two shortcuts (named High and Saver) that link to C:\Windows\System32\powercfg.exe /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c, and they work great. However, if I try to link to them in rainmeter (ie. LeftMouseDownAction="Saver" or LeftMouseDownAction="Saver.lnk"), it does nothing.
User avatar
Brian
Developer
Posts: 2689
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Changing Power Modes Within Rainmeter

Post by Brian »

I believe the command line switch for powercfg is a "-" instead of a "/".
Also, your parameters need to be outside of your quotes.

Try this: LeftMouseUpAction=["C:\Windows\System32\powercfg.exe" -setactive a1841308-3541-4fab-bc81-f71556f20b4a]

-Brian
LiKWiDCAKE
Posts: 3
Joined: October 9th, 2012, 3:27 pm

Re: Changing Power Modes Within Rainmeter

Post by LiKWiDCAKE »

The quotes thing did it! Thank you so much :)