Skip to content

Instantly share code, notes, and snippets.

@Au1st3in
Last active August 29, 2015 14:00
Show Gist options
  • Save Au1st3in/11128610 to your computer and use it in GitHub Desktop.
Save Au1st3in/11128610 to your computer and use it in GitHub Desktop.
Arma 2: DayZ Mod Launcher
::User Set Variables
::Arma 2 OA Directory Name
@set ARMA2OA=Arma 2 Operation Arrowhead
::Arma 2 Directory Name
@set ARMA2=Arma 2
::Steam Overlay (True/False)
@set Steam=True
::Arma 2 OA Launch Parameters
@set launchOptions=-high -skipIntro -nosplash
::Arma 2 OA Mods (@EXAMPLE1;@EXAMPLE2)
@set mods=@DayZ;
::DO NOT EDIT PAST THIS POINT
@setlocal enableextensions enabledelayedexpansion
@echo off
color 0f
cd ..\
if NOT EXIST !ARMA2OA!\ (
echo An error occured when trying to find the folder "!ARMA2OA!"
echo Edit the file and change the set ARMA2OA=
echo And add the name of your Arma 2 Operation Arrowhead directory.
pause
exit
)
if NOT EXIST !ARMA2!\ (
echo An error occured when trying to find the folder "!ARMA2!"
echo Edit the file and change the set ARMA2=
echo And add the name of your Arma 2 directory.
pause
exit
)
for /f %%a in ('echo.x') do if 1 EQU 1 (
set ARMA2OA=%%~dpa!ARMA2OA!
set ARMA2=%%~dpa!ARMA2!
)
cd !ARMA2OA!
if "!Steam!" == "True" (
cd ..\..\..\
for /f %%a in ('echo.x') do set applaunch=%%~dpa
set appFile=!applaunch!steam.exe
set applaunch="!applaunch!steam.exe" -applaunch 33930
cd !ARMA2OA!
)
if "!Steam!" == "False" (
set appFile=!ARMA2OA!\ArmA2OA.exe
set applaunch=start "" "!ARMA2OA!\ArmA2OA.exe"
)
if "!applaunch!" == "" (
echo Error, applaunch value could not be set!
pause
exit
)
if NOT EXIST "!appFile!" (
echo Error, !appFile! could not be found!
pause
exit
)
echo -------------------------------------------
echo Arma 2 Operation Arrowhead : !ARMA2OA!
echo Arma 2 : !ARMA2!
echo -------------------------------------------
echo Exec... : !applaunch!
echo -------------------------------------------
echo Arma 2: DayZ Mod
echo -------------------------------------------
!applaunch! !launchOptions! "-mod=!ARMA2!;expansion;expansion\beta;expansion\beta\expansion;" -mod=!mods!
pause
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment