-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateServer.bat
More file actions
77 lines (58 loc) · 2.63 KB
/
UpdateServer.bat
File metadata and controls
77 lines (58 loc) · 2.63 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
@echo off
color 0A
@rem http://media.steampowered.com/installer/steamcmd.zip
SETLOCAL ENABLEDELAYEDEXPANSION
:: _________________________________________________________
:: Do not run this script unless its in its own folder
:: _________________________________________________________
:: Your steam login example STEAMLOGIN= User name password
:: If it ask for your Steam Guard enter it and then type exit. Then rerun this script.
SET STEAMLOGIN= anonymous
:: The AppID of the Game/Server you wish to Install/Update
:: Set your AppID example AppID=739590
SET AppID=403240
:: DEFINE the following variables where applicable to your install
:: Use this " %~dp0 " for file directory if you want everything saved to the same folder you run the batch from.
:: set this to your steam CMD folder
:: Only change this if you have steamCMD already installed or change to the folder where you want steamCMD installed.
:: Leaving this to default will install steamCMD in the folder were the batch was ran from.
SET STEAMPATH=E:\steam
:: Set this to the folder where you wish to install/update your server.
:: Leaving this to default and it will install in the folder were the batch was ran from.
SET InstallLocation=%~dp0
:: Do not edit below this line unless you know what your doing.
:: _________________________________________________________
:: Checks if steamCMD is installed if it isn't the it will download and unzip it to the defined directory.
::______________________________________________________________________________________________________________
:CheckSteam
IF EXIST "%STEAMPATH%" (
goto Part2
) ELSE (
mkdir %STEAMPATH%%
goto Part2
)
:Part2
IF EXIST "%STEAMPATH%\steamcmd.exe" (
goto UpdateServer
) ELSE (
goto DownloadSteam
)
:DownloadSteam
echo downloading steamCMD please wait
bitsadmin.exe /transfer "Downloading steam" https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip %STEAMPATH%\steamcmd.zip
goto UnzipSteam
:UnzipSteam
echo unziping SteamCMD
powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('%STEAMPATH%\steamcmd.zip', '%STEAMPATH%'); }"
goto UpdateServer
::______________________________________________________________________________________________________________
:UpdateServer
echo.
echo You are about to Install/update your server
echo Dir: %InstallLocation%
echo
echo.
%STEAMPATH%\steamcmd.exe +force_install_dir %InstallLocation% +login %STEAMLOGIN% +"app_update %AppID%" validate +quit
echo .
echo Your Game Server is now up to date
timeout 10