Created
November 14, 2025 18:05
-
-
Save Aidan647/a2075b7f83feacbd0810445438ce18f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| REM Batch script to launch a Steam game and a second executable with parameters | |
| REM Usage: "C:\pathTo\startMultiple.bat" [id of second game/app] %command% [args] | |
| REM example: "C:\pathTo\startMultiple.bat" 993090 %command% -developerMode | |
| REM lossless scaling and Cities skylines 2 with developer mode | |
| REM Check if at least two arguments provided | |
| if "%~1"=="" ( | |
| echo Usage: %~nx0 steam_gameid path_to_exe [parameters_for_exe] | |
| exit /b 1 | |
| ) | |
| if "%~2"=="" ( | |
| echo Usage: %~nx0 steam_gameid path_to_exe [parameters_for_exe] | |
| exit /b 1 | |
| ) | |
| REM Store the Steam game ID and executable path | |
| set "STEAM_GAME_ID=%~1" | |
| set "EXE_PATH=%~2" | |
| REM Shift first two arguments so that the rest are parameters for the executable | |
| shift | |
| shift | |
| REM Build parameters string for the executable | |
| set "PARAMS=" | |
| :loop | |
| if "%~1"=="" goto endloop | |
| set "PARAMS=%PARAMS% %~1" | |
| shift | |
| goto loop | |
| :endloop | |
| REM Launch Steam game by ID | |
| start "" "steam://rungameid/%STEAM_GAME_ID%" | |
| REM Launch external executable with parameters | |
| timeout /t 1 /nobreak | |
| start "" "%EXE_PATH%" %PARAMS% | |
| exit /b 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment