bugfix: install wsl and windows features as administrator

This commit is contained in:
Baipyrus 2024-11-24 21:40:51 +01:00
parent 509ebf7437
commit 5014da3a46

View File

@ -19,7 +19,10 @@ function WSLInstall
$install = Read-Host "Install WSL2 now? [Y/n]" $install = Read-Host "Install WSL2 now? [Y/n]"
if ($install.ToLower() -ne 'n') if ($install.ToLower() -ne 'n')
{ InstallWSL {
# Start admin process, import this script, run 'InstallPackages' function
Start-Process powershell.exe -Verb RunAs -Wait `
-ArgumentList "-C", "'Import-Module ./wsl.psm1; InstallWSL'"
} }
wsl.exe --install -d Ubuntu wsl.exe --install -d Ubuntu