-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_mod_debug.bat
More file actions
37 lines (29 loc) · 1.02 KB
/
Copy pathrun_mod_debug.bat
File metadata and controls
37 lines (29 loc) · 1.02 KB
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
37
@echo off
setlocal ENABLEDELAYEDEXPANSION
rem Getting Steam path from registry
rem for /F "usebackq tokens=2*" %%I in (`reg query "HKCU\Software\Valve\Steam"^|find /I "SteamPath"`) do set steampath=%%J
for /f "usebackq tokens=1,2,*" %%i in (`reg query "HKCU\Software\Valve\Steam" /v "SteamPath"`) do set "steampath=%%~k"
rem Since this is loop, we cannot use ERRORLEVEL here
rem if not ERRORLEVEL 0 goto error
rem Replacing "/"'s with "\" in some cases
set steampath=%steampath:/=\%
rem Testing common paths
if not exist "%steampath%\steam.exe" (
if not exist "%ProgramFiles(x86)%\steam.exe" (
if not exist "%ProgramFiles%\steam.exe" (
goto error
) else (
set steampath=%ProgramFiles%
)
) else set steampath=%ProgramFiles(x86)%
)
echo Running game (Debug Mode)...
@start /D "%steampath%\steamapps\common\Source SDK Base 2013 Multiplayer" hl2.exe -sw -dev +sv_cheats 1 -console -novid -game "%CD%" -allowdebug -condebug
if %ERRORLEVEL% NEQ 0 goto error
goto success
:success
exit
:error
echo Error launching game!
pause
exit