Alberto Bj :
One slight problem though, i thought i figured it out but i tried to change the "games launcher.exe" to the main "process.exe" so the power option won't turn back, but it won't launch now, so basically i need to find a way to make the performance profile change to high performance when the main process is executed, not the launcher,
can you help?
edit: i need to find a way to make the performance profile change to high performance when the main process is executed, not the launcher. WHILE having the bat file launch the launcher (because it won't work when i directly launch from the game's main process)
A game launcher complicates the problem with batch files because I don't know of a way in a batch file to detect when the game ends since it only sees the launcher. It isn't aware that the launcher launched a game. Launching the game directly and bypassing the launcher usually isn't allowed by game makers (or at least they don't make it easy to do if it's even possible).
So how can it be done? Probably scripting is your next best option. A script
should be able to change the power scheme, run the launcher quits, detect when the game starts and ends, and change the power scheme back.
Windows supports various types of scripts, from powershell scripts to VBS and maybe others. I don't know much about either of those and only have used VBS once or twice many years ago. I prefer [
AutoHotKey] (AHK), it's a popular 3rd party free scripting application.
With AHK, you install it and then have to create scripts in notepad and save them as a .AHK file (for example, RunGame.ahk). You run the script by simply double clicking on it. If you run AHK by itself it does nothing (but open the help file) as it expects a script.
While I haven't attempted such a script in AHK, I do think it can be done and am willing to try to help you out with it if you want to go that route. I can't make any promises that we will figure it out but I'm willing to give it a try.
Do you want to try AHK? If so, download and install it. Give me the full path and filenames of both the game launcher and the game exectuable. For example:
Launcher: C:\program files\game\launcher.exe
Game: C:\program files\game\game.exe
and I'll start work on a script and we'll see what happens.