This repository was archived by the owner on Jun 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheasysteamcmd.bat
More file actions
78 lines (70 loc) · 2.23 KB
/
easysteamcmd.bat
File metadata and controls
78 lines (70 loc) · 2.23 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@echo off
setlocal enabledelayedexpansion
color 0A
set "configFile=easysteamcmd-config.txt"
set "steamCmdUrl=https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip"
set "steamCmdZip=steamcmd.zip"
set "steamCmdFolder=steamcmd"
for /f "tokens=1* delims==" %%a in (%configFile%) do (
if "%%a"=="APPID" (
set appid=%%b
) else if "%%a"=="STARTUP_COMMAND" (
set startupCommand=%%b
) else if "%%a"=="AUTO_UPDATE" (
set autoUpdate=%%b
) else if "%%a"=="VALIDATE" (
set validate=%%b
) else if "%%a"=="STEAM_LOGIN" (
set steamLogin=%%b
) else if "%%a"=="STEAM_PASSWORD" (
set steamPassword=%%b
) else if "%%a"=="BETA_BUILD" (
set betaBuild=%%b
)
)
if "!startupCommand:~-1!"=="=" (
set "startupCommand=!startupCommand:~0,-1!"
)
echo.
echo Easy SteamCMD - https://github.com/ghostcap-gaming
echo.
echo Game AppID: %appid%
echo Startup Command: %startupCommand%
echo Auto Update: %autoUpdate%
echo Validate: %validate%
echo Steam Login: %steamLogin%
echo Beta Build: %betaBuild%
echo __________________________________________________________________
echo.
if not exist "%steamCmdFolder%" (
if not exist "%steamCmdZip%" (
echo Downloading SteamCMD...
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%steamCmdUrl%', '%steamCmdZip%')"
)
echo Extracting SteamCMD...
powershell -Command "Expand-Archive -Path '%steamCmdZip%' -DestinationPath '%steamCmdFolder%'"
)
set "steamCmd=%steamCmdFolder%\steamcmd.exe"
if "%steamLogin%"=="" (
set loginCmd=+login anonymous
) else (
set loginCmd=+login %steamLogin% %steamPassword%
)
if "%autoUpdate%"=="1" (
if "%validate%"=="1" (
if "%betaBuild%"=="" (
%steamCmd% %loginCmd% +force_install_dir ../ +app_update %appid% validate +quit
) else (
%steamCmd% %loginCmd% +force_install_dir ../ +app_update %appid% -beta %betaBuild% validate +quit
)
) else (
if "%betaBuild%"=="" (
%steamCmd% %loginCmd% +force_install_dir ../ +app_update %appid% +quit
) else (
%steamCmd% %loginCmd% +force_install_dir ../ +app_update %appid% -beta %betaBuild% +quit
)
)
)
:startup
%startupCommand%
pause