@echo off set scriptPath=%~dp0 set customPath=Z:\Servers\dayzserver\.customs set d=%DATE% set t=%TIME:~0,8% set t=%t: =0% set t=%t::=-% set day=%d:~0,2% set month=%d:~3,2% set year=%d:~6% set filename=wDayzManager_%year%-%month%-%day%_%t%.log ::: Kill ghost instances taskkill /im DayZServer_x64.exe /F >nul 2>&1 timeout 3 /nobreak >nul cd /d %scriptPath% pushd %scriptPath% set update=0 if "%1" equ "/U" set update=1 if "%1" equ "/u" set update=1 if "%1" equ "-U" set update=1 if "%1" equ "-u" set update=1 if "%1" equ "--update" set update=1 @REM powershell -ExecutionPolicy RemoteSigned -File wDayzManager.ps1 %update% powershell -ExecutionPolicy RemoteSigned -File wDayzManager.ps1 %update% > %filename% popd