lollms-webui/scripts/wsl/wsl_installer.bat

22 lines
575 B
Batchfile
Raw Normal View History

2023-09-22 21:16:22 +00:00
@echo off
2023-09-27 19:23:47 +00:00
echo Checking if WSL is enabled...
2023-09-22 21:16:22 +00:00
wsl --list >nul 2>&1
if %errorlevel% neq 0 (
2023-09-27 19:23:47 +00:00
echo WSL is not enabled. Enabling it...
2023-09-22 21:16:22 +00:00
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
2023-09-27 19:23:47 +00:00
echo WSL is now enabled.
2023-09-22 21:16:22 +00:00
) else (
echo WSL is enabled and installed.
2023-09-27 19:23:47 +00:00
)
echo Checking if WSL 2 is installed...
wsl --set-default-version 2 >nul 2>&1
if %errorlevel% neq 0 (
echo WSL 2 is not installed. Installing it...
wsl --install
echo WSL 2 installation complete.
) else (
echo WSL 2 is already installed.
)
pause