fixed installer issues

This commit is contained in:
saloui 2023-09-21 08:49:40 +02:00
parent c05c823b73
commit 478ed75a80
2 changed files with 22 additions and 4 deletions

View File

@ -4,10 +4,9 @@
wsl --list >nul 2>&1 wsl --list >nul 2>&1
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo WSL is not installed. Installing... echo WSL is not installed. Installing...
wsl --install -e
wsl --set-default-version 2
echo Installing Ubuntu 20.04 LTS... echo Installing Ubuntu 20.04 LTS...
wsl --install -d Ubuntu-20.04 -e wsl --install -d Ubuntu-20.04
wsl --set-default-version 2
) else ( ) else (
echo WSL is already installed. echo WSL is already installed.
) )
@ -16,3 +15,4 @@ if %errorlevel% neq 0 (
wsl.exe -d Ubuntu-20.04 ./install_script.sh wsl.exe -d Ubuntu-20.04 ./install_script.sh
echo Installation and script execution complete! echo Installation and script execution complete!
pause

View File

@ -0,0 +1,18 @@
@echo off
:: Check if WSL is installed
wsl --list >nul 2>&1
if %errorlevel% neq 0 (
echo WSL is not installed. Installing...
wsl --install -e
wsl --set-default-version 2
echo Installing Ubuntu 20.04 LTS...
wsl --install -d Ubuntu-20.04 -e
) else (
echo WSL is already installed.
)
:: Execute the .sh script
wsl.exe -d Ubuntu-20.04 ./install_script.sh
echo Installation and script execution complete!