-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.cmd
36 lines (28 loc) · 1.02 KB
/
script.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
set /A steam_game_id=252950
set path_program=D:\Documents\My Games\Rocket League
set exe_name_mod=BakkesMod.exe
set steam_path=C:\Program Files (x86)\Steam
set /A time_sleep=2
echo Running mod ...
start "" "%path_program%\%exe_name_mod%"
REM Waiting mod is running ...
timeout /t %time_sleep% /nobreak > nul
echo Running steam game ...
"%steam_path%\steam.exe" "-applaunch" "%steam_game_id%"
REM Waiting game is running ...
:loop
FOR /F "tokens=2* skip=2" %%a in ('reg query "HKEY_CURRENT_USER\SOFTWARE\Valve\Steam" /v "RunningAppID"') do set /A HKEY_IDGAME=%%b
if "0" EQU "%HKEY_IDGAME%" (
timeout /t %time_sleep% /nobreak > nul
goto :loop
)
echo Check if steam game is running ...
:loop2
FOR /F "tokens=2* skip=2" %%a in ('reg query "HKEY_CURRENT_USER\SOFTWARE\Valve\Steam" /v "RunningAppID"') do set /A HKEY_IDGAME=%%b
if "%steam_game_id%" EQU "%HKEY_IDGAME%" (
timeout /t %time_sleep% /nobreak > nul
goto :loop2
)
echo Exiting program ...
taskkill /IM "%exe_name_mod%"