forked from Arkensor/DayZCommunityOfflineMode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployEnoch.bat
37 lines (25 loc) · 833 Bytes
/
deployEnoch.bat
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 enableextensions enabledelayedexpansion
cd /D "%~dp0"
set /a failed=0
for /F "Tokens=2* skip=2" %%A In ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\bohemia interactive\Dayz" /v "main" 2^>nul') do (
set "_DAYZPATH=%%B"
)
if "%_DAYZPATH%" == "" (
set /a failed=1
echo.DayZ was not set in the registry path.
) else (
echo.Found DayZ at "%_DAYZPATH%"
)
if %failed%==1 (
endlocal
echo Failed to obtain paths.
goto:eof
)
set "ClientDirectory=%_DAYZPATH%"
RD /s /q "%ClientDirectory%\Missions\DayZCommunityOfflineMode.Enoch" > NUL
xcopy /s/e /y /i "%cd%\Missions\DayZCommunityOfflineMode.Enoch" "%ClientDirectory%\Missions\DayZCommunityOfflineMode.Enoch" > NUL
chdir /d "%ClientDirectory%\Missions\DayZCommunityOfflineMode.Enoch"
setlocal DisableDelayedExpansion
CALL "DayZCommunityOfflineMode.bat"
endlocal