Domanda

I have been trying to create a batch file that will set the laptop to high power setting run minecraft, then when minecraft closes to set power settings to power saver mode. I am trying to launch the minecraft installed with my techniclauncher, currently my Bat looks like this.

start powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

start C:\Users\Eric\Downloads\TechnicLauncher.exe /wait

start Powercfg /s a1841308-3541-4fab-bc81-f71556f20b4a

When i run the bin, the power modes change for just a second, i think the problem is with the launcher for the game. but i cant figure out a way around it

È stato utile?

Soluzione

This works in Windows 8. It stores your current power setting and changes to High performance, lists the power scheme settings and then restores it to the user settings.

If this doesn't remain at High performance until you press a key, then it may need to be run with elevated permissions.

@echo off
for /f "tokens=4" %%b in ('powercfg /l ^|find ") *" ') do set PowCurrent=%%b
for /f "tokens=4" %%b in ('powercfg /l ^|find /i "High performance"') do set PowHigh=%%b
for /f "tokens=4" %%b in ('powercfg /l ^|find /i "Balanced"') do set PowBal=%%b
for /f "tokens=4" %%b in ('powercfg /l ^|find /i "Power saver"') do set PowSav=%%b
rem set pow

echo setting to High performance
powercfg /s %powhigh%

powercfg /l
pause

echo resetting to user default
powercfg /s %PowCurrent%

powercfg /l
pause
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top