I'm having some issues getting a batch file to set affinity for a game I'm hosting multiple servers of.
It uses the same exe file (DCS.exe) for each instance but I want it to run each of the five instances in a different core instead of doing what it likes to do (as the game is not multithreaded and is pretty poorly coded),
I have a batch file that starts my 5 server instances, but I'm trying to get it to work so that each instance runs in its own core on the CPU..... I have lots of cores so its not a problem but instead of DCS trying to run all 5 instances in one core as it does by default, I want it to run each instance in a separate core
This is what I have currently and it works great for running without affinity:
:loop
timeout /t 5 >nul
::REM -- wait before launching CF CAPTURE
Start "" /affinity 3 /high "E:\DCS\bin\DCS.exe" --norender --server -w CF_CAPTURE
timeout /t 5 >nul
::REM -- wait before launching SF CAPTURE
Start "" /affinity C /high "E:\DCS\bin\DCS.exe" --norender --server -w SF_CAPTURE
timeout /t 5 >nul
::REM -- wait before launching ROUND TABLE CAUCASUS
Start "" /affinity 30 /high "E:\DCS\bin\DCS.exe" --norender --server -w ROUND_TABLE_GC
timeout /t 5 >nul
::REM -- wait before launching ROUND TABLE PERSIAN GULF
Start "" /affinity C0/high "E:\DCS\bin\DCS.exe" --norender --server -w ROUND_TABLE_PERSIA
timeout /t 5 >nul
::REM -- wait before launching BONUS SERVER BS_CAPTURE
Start "" /affinity 300 /high "E:\DCS\bin\DCS.exe" --norender --server -w BS_CAPTURE
timeout /t 36030 /nobreak
::REM -- amount of time for servers to run
taskkill /f /im DCS.exe
goto loop
Exit