Judess69er

Server Autoinstaller

Jan 3rd, 2024 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. @echo off
  2. setlocal enableextensions
  3.  
  4. :: Set the the installation folders.
  5. set scmdpath=C:\steamcmd
  6. set filepath=C:\dayzserver
  7. set batchname=dayz_ds
  8. set /p username="SteamUserID: "
  9.  
  10. :::: End of Settings ::::
  11.  
  12. goto start
  13.  
  14. :restart
  15. start "" "%~f0"
  16. exit
  17.  
  18. :start
  19. mode 45,10
  20. <NUL title Main Menu
  21. for /F "tokens=1,2 delims=#" %%x in ('"prompt #$H#$E# & echo on & for %%w in (1) do rem"') do (
  22. set "DEL=%%x"
  23. )
  24. cls
  25. @echo 1.Install or Update SteamCMD
  26. @echo.
  27. @echo 2.Install or Update Server
  28. @echo.
  29. @echo 3.Create Server Launcher Batch File
  30. choice /C 123
  31. if errorlevel 3 goto batchsetup
  32. if errorlevel 2 goto stablerelease
  33. if errorlevel 1 goto downloadsteamcmd
  34.  
  35. :downloadsteamcmd
  36. mode 120,30
  37. <NUL title Installing SteamCMD...
  38. md "%scmdpath%"
  39. curl -SL -A "Mozilla/5.0" http://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip --ssl-reqd --output "%scmdpath%"\SteamCMD.zip
  40.  
  41. cd /d "%scmdpath%"
  42. powershell -command "Expand-Archive -Force SteamCMD.zip ./"
  43. "%scmdpath%"\steamcmd.exe +login %username% +force_install_dir "%filepath%" +app_update 223350 +quit
  44. <NUL title SteamCMD Installed!
  45. del SteamCMD.zip
  46. timeout 3
  47. goto restart
  48.  
  49. :stablerelease
  50. mode 120,30
  51. <NUL title Updating DayZ Server.
  52. "%scmdpath%"\steamcmd.exe +login %username% +force_install_dir "%filepath%" +app_update 223350 validate +quit
  53. <NUL title Rust Server Updated!
  54. timeout 3
  55. goto restart
  56.  
  57. :batchsetup
  58. REM Creating Start File
  59. (
  60. echo @echo off
  61. echo :start
  62. echo DayZServer_x64.exe -batchmode ^^
  63. echo -config=serverDZ.cfg ^^
  64. echo -port=2302 ^^
  65. echo --dologs ^^
  66. echo -adminlog ^^
  67. echo -netlog ^^
  68. echo -freezecheck ^^
  69. echo -profiles=.\DayZServerprofiles
  70. echo goto start
  71. )>DayZServer.bat
  72.  
  73. :: DayZ Server Butler by Judess69er ::
Advertisement
Add Comment
Please, Sign In to add comment