Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set WSLExec=c:\Users\%username%\UbuntuWSL\ubuntu1804.exe
- REM runas /trustlevel:0x20000 "cmd /c %WSLExec% install --root"
- %WSLExec% install --root"
- %WSLExec% run /mnt/c/Users/%username%/UbuntuWSL/install/configureUbuntu.sh %username%"
- %WSLExec% config --default-user %username%"
- copy %WSLExec% c:\Users\%username%\Desktop
- bash -c ls >nul: 2>nul:
- if %ERRORLEVEL% NEQ 0 (
- wslconfig /u Ubuntu-18.04
- )
- bash -c ls >nul: 2>nul:
- if %ERRORLEVEL% NEQ 0 (
- call :MessageBox "Something wrong happened during Ubuntu WSL installation"
- ) else (
- call :MessageBox "Ubuntu WSL installation is complete"
- )
- del "%~f0"
- exit 0
- :MessageBox
- echo wscript.quit MsgBox ("%~1", 0, "UbuntuWSL") > infobox.vbs
- wscript /nologo infobox.vbs
- del infobox.vbs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement