Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaption committed Jan 17, 2024
1 parent 852aa0e commit c573347
Showing 1 changed file with 57 additions and 8 deletions.
65 changes: 57 additions & 8 deletions LunarClientTools.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@rem LunarClientTools v1.1 by Vaption
@rem https://github.com/Vaption/LunarClientTools

@ECHO OFF
TITLE LunarClientTools v1.0
TITLE LunarClientTools v1.1

NET SESSION >nul 2>&1
IF %ERRORLEVEL% EQU 0 (
Expand Down Expand Up @@ -69,17 +72,26 @@ if %M%==11 goto :kill

@ECHO ON

:cls-menu
cls
goto :menu

:fixes-menu
cls
echo ###################################################################
echo ## Lunar Client Tools Script ##
echo ## https://github.com/Vaption/LunarClientTools ##
echo ###################################################################
echo.
echo.
echo.
echo Premade Fixes Menu
echo.
echo 1. Launcher Startup Fix
echo 2. Cancel
set /P M=[96mType[0m [91m1[0m [96mand then press enter[0m[91m:[0m
set /P M=[96mType[0m [91m1-2[0m [96mand then press enter[0m[91m:[0m
if %M%==1 goto :lc-comp
if %M%==2 goto :menu
if %M%==2 goto :cls-menu
echo.
echo.
echo.
Expand All @@ -88,6 +100,11 @@ cls
goto :menu

:json-menu
cls
echo ###################################################################
echo ## Lunar Client Tools Script ##
echo ## https://github.com/Vaption/LunarClientTools ##
echo ###################################################################
echo.
echo.
echo.
Expand All @@ -99,7 +116,7 @@ echo 3. Cancel
set /P M=Type 1-3 and then press enter:
if %M%==1 goto :json-auto
if %M%==2 goto :json-manual
if %M%==2 goto :menu
if %M%==3 goto :cls-menu
echo.
echo.
echo.
Expand All @@ -120,7 +137,7 @@ if not exist "%settingsFolder%" (
)

echo Scanning the settings folder...
timeout /t 3 nobreak>nul
timeout /t 3 /nobreak >nul
set /a totalProfiles=0
for /d %%i in ("%settingsFolder%\*") do (
set /a totalProfiles+=1
Expand All @@ -130,7 +147,7 @@ echo Found %totalProfiles% profiles in the settings folder.

echo Generating profiles...
echo.
timeout /t 3 nobreak>nul
timeout /t 3 /nobreak >nul

set "jsonContent=["

Expand Down Expand Up @@ -201,6 +218,10 @@ goto :menu
echo.
echo.
echo.
choice /N /C YC /M "Are you sure you want to proceed? Press Y to Continue, Press C to Cancel"%1
IF ERRORLEVEL==2 goto :menu
IF ERRORLEVEL==1 goto :cache-rem-action
:cache-rem-action
del c:\Users\"%username%"\.lunarclient\game-cache\* /Q > nul
del c:\Users\"%username%"\.lunarclient\launcher-cache\* /Q > nul
del c:\Users\"%username%"\.lunarclient\offline\multiver\cache\* /Q > nul
Expand All @@ -216,6 +237,10 @@ goto :menu
echo.
echo.
echo.
choice /N /C YC /M "Are you sure you want to proceed? Press Y to Continue, Press C to Cancel"%1
IF ERRORLEVEL==2 goto :menu
IF ERRORLEVEL==1 goto :logs-rem-action
:logs-rem-action
del c:\Users\"%username%"\.lunarclient\logs\* /Q > nul
echo Successfully cleared your game/launcher logs.
echo.
Expand All @@ -242,6 +267,10 @@ goto :menu
echo.
echo.
echo.
choice /N /C YC /M "Are you sure you want to proceed? Press Y to Continue, Press C to Cancel"%1
IF ERRORLEVEL==2 goto :menu
IF ERRORLEVEL==1 goto :jre-rem-action
:jre-rem-action
del c:\Users\"%username%"\.lunarclient\jre\* /Q > nul
echo Successfully deleted LunarClient's JRE.
echo.
Expand All @@ -255,6 +284,10 @@ goto :menu
echo.
echo.
echo.
choice /N /C YC /M "Are you sure you want to proceed? Press Y to Continue, Press C to Cancel"%1
IF ERRORLEVEL==2 goto :menu
IF ERRORLEVEL==1 goto :ofl-rem-action
:ofl-rem-action
del c:\Users\"%username%"\.lunarclient\offline\* /Q > nul
echo Successfully deleted LunarClient's offline folder.
echo.
Expand All @@ -268,8 +301,12 @@ goto :menu
echo.
echo.
echo.
choice /N /C YC /M "Are you sure you want to proceed? Press Y to Continue, Press C to Cancel"%1
IF ERRORLEVEL==2 goto :menu
IF ERRORLEVEL==1 goto :lc-comp-action
:lc-comp-action
reg Add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "c:\Users\%username%\AppData\Local\Programs\lunarclient\Lunar Client.exe" /d "~ WIN8RTM"
echo [32mSuccessfully modified the launcher's compability settings.[0m
echo [32mSuccessfully modified the launcher's compatibility settings.[0m
echo.
echo.
echo.
Expand All @@ -281,6 +318,10 @@ goto :menu
echo.
echo.
echo.
choice /N /C YC /M "Are you sure you want to proceed? Press Y to Continue, Press C to Cancel"%1
IF ERRORLEVEL==2 goto :menu
IF ERRORLEVEL==1 goto :prf-backup-action
:prf-backup-action
mkdir c:\Users\"%username%"\Desktop\"LCT-Profiles"
xcopy /s /v c:\Users\"%username%"\.lunarclient\settings\game c:\Users\"%username%"\Desktop\LCT-Profiles /Q > nul
del c:\Users\"%username%"\Desktop\LCT-Profiles\accounts.json
Expand Down Expand Up @@ -310,6 +351,10 @@ goto :menu
echo.
echo.
echo.
choice /N /C YC /M "Are you sure you want to proceed? Press Y to Continue, Press C to Cancel"%1
IF ERRORLEVEL==2 goto :menu
IF ERRORLEVEL==1 goto :igpu-dgpu-action
:igpu-dgpu-action
@echo off
set "root_directory=C:\Users\%username%\.lunarclient\jre\"
set "javaw_path="
Expand Down Expand Up @@ -343,6 +388,10 @@ goto :menu
echo.
echo.
echo.
choice /N /C YC /M "Are you sure you want to proceed? Press Y to Continue, Press C to Cancel"%1
IF ERRORLEVEL==2 goto :menu
IF ERRORLEVEL==1 goto :lc-admin-action
:lc-admin-action
reg Add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "c:\Users\%username%\AppData\Local\Programs\lunarclient\Lunar Client.exe" /d "RUNASADMIN"
echo Successfully forced LunarClient to run as admin everytime.
echo.
Expand All @@ -359,7 +408,7 @@ exit
:windows-error
echo ############################# ERROR ###############################
echo # #
echo [90m#[0m [91mThis script only works on Windows 10 and 11.[0m [90m#[0m
echo [90m#[0m [91mThis script only works on Windows 10 and above.[0m [90m#[0m
echo # Your current Windows version is not supported #
echo # If you believe this is an issue, open an issue on Github #
echo ###################################################################
Expand Down

0 comments on commit c573347

Please sign in to comment.