Last active
August 29, 2015 14:00
-
-
Save Au1st3in/11126906 to your computer and use it in GitHub Desktop.
Switch Between DayZ Experimental and Stable Builds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::User Set Variables | |
::Steam Install Directory (Steam.exe) | |
@set SteamDIR=C:\Program Files (x86)\Steam | |
::Steam Library Directory (~\common\DayZ) [Drive must have NTFS format] | |
@set SteamLIB=C:\Program Files (x86)\Steam | |
::DayZ Stable Folder Name in ~\SteamApps\common\ | |
@set Stable=DayZ_stable | |
::DayZ Experimental Folder Name in ~\SteamApps\common\ | |
@set Experimental=DayZ_experimental | |
::DO NOT EDIT PAST THIS POINT | |
::Batch Made by Au1st3in | |
@setlocal enableextensions enabledelayedexpansion | |
@echo off | |
@set DayZ=DayZ | |
color 0f | |
goto admin | |
:continue | |
set common=!SteamLIB!\SteamApps\common\ | |
cd %common% | |
if NOT EXIST "!DayZ!\enabled.txt" ( | |
if NOT EXIST "!Stable!" ( | |
if NOT EXIST "!Experimental!" ( | |
mkdir "!Stable!" | |
mkdir "!Experimental!" | |
xcopy /s/e /h /k /y "!DayZ!" "!Stable!" | |
xcopy /s/e /h /k /y "!DayZ!" "!Experimental!" | |
rd /s /q "!DayZ!" | |
cls | |
) | |
) | |
) | |
rmdir !DayZ! | |
attrib -h "!Stable!\enabled.txt" | |
attrib -h "!Experimental!\enabled.txt" | |
if NOT EXIST !Experimental!\experimental.txt ( | |
if NOT EXIST !Stable!\stable.txt ( | |
break>"!Stable!\enabled.txt" | |
del "!Experimental!\enabled.txt" | |
mklink /D "%CD%\!DayZ!" "%CD%\!Stable!" | |
if EXIST !Stable!\enabled.txt ( | |
attrib +h "!Stable!\enabled.txt" | |
) | |
set branch=Stable | |
goto steam | |
) | |
) | |
if NOT EXIST !Experimental!\experimental.txt ( | |
break>"!Experimental!\experimental.txt" | |
) | |
if EXIST !Experimental!\experimental.txt ( | |
attrib +r "!Experimental!\experimental.txt" | |
) | |
if NOT EXIST !Stable!\stable.txt ( | |
break>"!Stable!\stable.txt" | |
) | |
if EXIST !Stable!\stable.txt ( | |
attrib +r "!Stable!\stable.txt" | |
) | |
if EXIST !Experimental!\enabled.txt ( | |
break>"!Stable!\enabled.txt" | |
del "!Experimental!\enabled.txt" | |
mklink /D "%CD%\!DayZ!" "%CD%\!Stable!" | |
if EXIST !Stable!\enabled.txt ( | |
attrib +h "!Stable!\enabled.txt" | |
) | |
set branch=Stable | |
set beta=NONE - Opt out of all beta programs | |
set app_update="!SteamDIR!\steam.exe" +app_update 221100 +app_update 221100 -clearbeta validate +quit | |
goto steam | |
) | |
if EXIST !Stable!\enabled.txt ( | |
break>"!Experimental!\enabled.txt" | |
del "!Stable!\enabled.txt" | |
mklink /D "%CD%\!DayZ!" "%CD%\!Experimental!" | |
if EXIST !Experimental!\enabled.txt ( | |
attrib +h "!Experimental!\enabled.txt" | |
) | |
set branch=Experimental | |
set beta=experimental - Preview testing version | |
set app_update="!SteamDIR!\steam.exe" +app_update 221100 +app_update 221100 -beta experimental validate +quit | |
goto steam | |
) | |
:steam | |
cls | |
echo DayZ !branch! | |
echo ----------------------------------------- | |
echo Stable : !Stable! | |
echo Experimental : !Experimental! | |
echo ----------------------------------------- | |
echo Beta : [!beta!] | |
echo ----------------------------------------- | |
pause | |
exit | |
:admin | |
net session >nul 2>&1 | |
if %errorLevel% == 0 ( | |
goto continue | |
) else ( | |
echo ------------------------------------- | |
echo Administrative Privileges Required | |
echo RUN AS ADMINISTRATOR | |
echo ------------------------------------- | |
pause | |
exit | |
) | |
pause >nul |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason it managed to copy all the files into Stable and Experimental direcotries, but did not generate all of the hidden stable/experimental txt files to swap properly, only an enable.txt in the Stable branch.. Fixed manually. enable.txt toggles between directories properly now.
But the 'app_update' is apparently not updating Steam properly when attempting to swap.
Steam remains in stable branch after script transition to Experimental.