Lethal-Extended/Lethal-Utility.bat

174 lines
6.5 KiB
Batchfile
Raw Normal View History

2024-04-17 19:11:00 +00:00
@ECHO OFF
CLS
color 0a
echo [=====================]
echo [Lethal-Utility v1.0.7]
echo [=====================]
echo[
echo [===========================]
ECHO [ 1.) Update/Install Stable ]
ECHO [ 2.) Update/Install Beta ]
ECHO [ 3.) Tools ]
ECHO [ 4.) Uninstall ]
ECHO [ 5.) Exit ]
echo [===========================]
echo[
2024-08-02 21:21:31 +00:00
CHOICE /C 12345 /M "Enter your choice:"
2024-04-17 19:11:00 +00:00
:: Note - list ERRORLEVELS in decreasing order
2024-08-02 21:21:31 +00:00
IF ERRORLEVEL 5 GOTO Exit
IF ERRORLEVEL 4 GOTO Uninstall
IF ERRORLEVEL 3 GOTO Tools
2024-07-11 05:24:57 +00:00
IF ERRORLEVEL 2 GOTO Beta-Install
IF ERRORLEVEL 1 GOTO Stable-Install
_________________________________________________________________________________________________________________________________________
:Tools
ECHO Tools (@echo off
cls
color 04
echo [====================]
ECHO [Lethal-Utility Tools]
echo [====================]
echo[
echo [==========================]
ECHO [ 1.) Update Lethal-Utility]
ECHO [ 2.) Config Sync ]
ECHO [ 3.) DevKit ]
ECHO [ 4.) Return ]
echo [==========================]
echo[
2024-08-02 21:21:31 +00:00
CHOICE /C 1234 /M "Enter your choice:"
2024-07-11 05:24:57 +00:00
:: Note - list ERRORLEVELS in decreasing order
2024-08-02 21:21:31 +00:00
IF ERRORLEVEL 4 GOTO Return
IF ERRORLEVEL 3 GOTO DevKit
IF ERRORLEVEL 2 GOTO ConfigSync
2024-07-11 05:24:57 +00:00
IF ERRORLEVEL 1 GOTO LUUpdate
_________________________________________________________________________________________________________________________________________
2024-04-17 19:11:00 +00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
:Uninstall
ECHO Uninstall (@echo off
cls
set /p UserInputPath=What Drive is the game installed to? (Letter only) -- (Uninstaller)
echo(Detecting Game Installation Directory ...
for %%a in (%UserInputPath%) do (
pushd "%%~a:\"
for /f "tokens=*" %%b in ('dir /b /s /a:-d "Lethal Company.exe" 2^>nul ^| find /i "Lethal Company.exe" 2^>nul') do (
for %%c in ("%%~b\.") do set "gameInstallationDirectory=%%~dpc"
)
popd
)
echo(Game Installation Directory : %gameInstallationDirectory%
RMDIR /S /Q "%gameInstallationDirectory%\BepInEx\"
RMDIR /S /Q "%gameInstallationDirectory%\BepInExPack\"
RMDIR /S /Q "%gameInstallationDirectory%\BepInEx_Shim_Backup\"
RMDIR /S /Q "%gameInstallationDirectory%\doorstop_libs\"
RMDIR /S /Q "%gameInstallationDirectory%\testing\"
RMDIR /q /s "%gameInstallationDirectory%\PolaroidPictures\"
RMDIR /q /s "%gameInstallationDirectory%\launcherref\"
RMDIR /q /s "%gameInstallationDirectory%\Cache"
del /q /s "%gameInstallationDirectory%\discord_game_sdk.dll"
del /q /s "%gameInstallationDirectory%\doorstop_config.ini"
del /q /s "%gameInstallationDirectory%\README.md"
del /q /s "%gameInstallationDirectory%\CHANGELOG.md"
del /q /s "%gameInstallationDirectory%\KEYBINDS.md"
del /q /s "%gameInstallationDirectory%\.gitattributes"
del /q /s "%gameInstallationDirectory%\.gitignore"
del /q /s "%gameInstallationDirectory%\icon.png"
del /q /s "%gameInstallationDirectory%\install.bat"
del /q /s "%gameInstallationDirectory%\manifest.json"
del /q /s "%gameInstallationDirectory%\winhttp.dll"
del /q /s "%gameInstallationDirectory%\Lethal-Utility.bat"
del /q /s "%gameInstallationDirectory%\version.txt"
del /q /s "%gameInstallationDirectory%\Shortcut.exe"
del /q /s "%gameInstallationDirectory%\directory.txt"
2024-08-02 21:21:31 +00:00
del /q /s "%gameInstallationDirectory%\updater.bat"
del /q /s "%gameInstallationDirectory%\beta-updater.bat"
2024-04-17 19:11:00 +00:00
echo(Lethal-Extended Uninstalled!
pause)
2024-07-11 05:24:57 +00:00
GOTO End
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
:Stable-Install
ECHO Stable-Install (@echo off
cls
FOR /F "tokens=* delims=" %%x in (directory.txt) do set gameInstallationDirectory=%%x
echo(Game Installation Directory : %gameInstallationDirectory%
2024-08-02 21:21:31 +00:00
RMDIR /S /Q "C:\download-temp\"
mkdir C:\download-temp
curl -L "https://cdn.galactiq.net/lethalextended/updater.bat" --output "C:\download-temp\updater.bat"
xcopy /e "C:\download-temp" "%gameInstallationDirectory%" /Y
cd %gameInstallationDirectory%
start "" "updater.bat"
echo(Running Updater!
exit
2024-07-11 05:24:57 +00:00
%0
GOTO End
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
:Beta-Install
2024-08-02 21:21:31 +00:00
ECHO Beta-Install (@echo off
2024-07-11 05:24:57 +00:00
cls
FOR /F "tokens=* delims=" %%x in (directory.txt) do set gameInstallationDirectory=%%x
echo(Game Installation Directory : %gameInstallationDirectory%
2024-08-02 21:21:31 +00:00
RMDIR /S /Q "C:\download-temp\"
mkdir C:\download-temp
curl -L "https://cdn.galactiq.net/lethalextended/beta-updater.bat" --output "C:\download-temp\beta-updater.bat"
xcopy /e "C:\download-temp" "%gameInstallationDirectory%" /Y
cd %gameInstallationDirectory%
start "" "beta-updater.bat"
echo(Running Updater!
exit
2024-07-11 05:24:57 +00:00
%0
2024-04-17 19:11:00 +00:00
GOTO End
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2024-04-30 03:56:32 +00:00
:LUUpdate
ECHO LUUpdate (@echo off
cls
FOR /F "tokens=* delims=" %%x in (directory.txt) do set gameInstallationDirectory=%%x
echo(Game Installation Directory : %gameInstallationDirectory%
RMDIR /S /Q "C:\launcher-temp\"
mkdir C:\launcher-temp
2024-07-11 05:24:57 +00:00
curl -L "https://cdn.galactiq.net/lethalextended/Lethal-Utility.bat" --output "C:\launcher-temp\Lethal-Utility.bat"
2024-04-30 03:56:32 +00:00
powershell -command "Start-Sleep -s 2"
xcopy /e "C:\launcher-temp" "%gameInstallationDirectory%" /Y
RMDIR /S /Q "C:\launcher-temp\"
echo(Update Finished!
TIMEOUT /T 5
%0
2024-07-11 05:24:57 +00:00
GOTO End
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
:ConfigSync
ECHO ConfigSync (@echo off
cls
FOR /F "tokens=* delims=" %%x in (directory.txt) do set gameInstallationDirectory=%%x
echo(Game Installation Directory : %gameInstallationDirectory%
RMDIR /S /Q "C:\config-sync\"
mkdir C:\config-sync
curl -L "https://cdn.galactiq.net/lethalextended/deps/DRP/config.zip" --output "C:\config-sync\config.zip"
RMDIR /S /Q "%gameInstallationDirectory%\BepInEx\config"
mkdir "%gameInstallationDirectory%\BepInEx\config"
powershell Expand-Archive "C:\config-sync\config.zip" -DestinationPath "C:\config-sync"
powershell -command "Start-Sleep -s 2"
del /q /s "C:\config-sync\config.zip"
xcopy /e "C:\config-sync" "%gameInstallationDirectory%\BepInEx\config" /Y
RMDIR /S /Q "C:\config-sync\"
echo(Configs Synced!
TIMEOUT /T 5
%0
2024-04-30 03:56:32 +00:00
GOTO End
2024-07-11 05:24:57 +00:00
:: -------------------------------------------------------------------------------------------------------------------------
:Return
%0
2024-04-30 03:56:32 +00:00
GOTO End
2024-04-17 19:11:00 +00:00
:End