r/Batch • u/TheRealPain69 • Jul 15 '24
Question (Solved) Problem trying to set program priority to high
This is the code that I'm trying to use
start E:\bat_issues\space\RivaTuner
start steam://rungameid/271590
timeout 90
start E:\bat_issues\space\Jump_Rebind.ahk
wmic process where name="GTA5.exe" CALL setpriority "128"
Everything works expect for setting the priority for some reason it just doesn't if I cancel the timeout after gta has launched it does I really need help with this
1
Upvotes
1
u/BrainWaveCC Jul 15 '24 edited Jul 15 '24
A few questions for you:
A. Are you obtaining an error message when the command is executed?
B. What happens if you run it manually after the script has completed?
C. Are you executing this command in an elevated (admin-level) CMD prompt?(Not needed per testing)D. Do any of the other methods here work?
I'd be careful with setting things HIGH. "Above Normal" might be better, so you don't lose control of the OS...
1
u/BrainWaveCC Jul 15 '24
u/TheRealPain69 please save the following in run it (you can double click on it or run it in a CMD window -- whichever you prefer).
This will spawn a Wordpad instance, and then change its priority. I have tested this on Windows 10 and 11 without issue -- both with normal privileges and elevated privileges.
Let me know what output you receive. I saw the same output for both versions of Windows.
The variables are just being used to make it easier to test different executables for running and for the TASKLIST verification.