From d5ecf0ad0074529ff7e439fdbc530d0d45880d36 Mon Sep 17 00:00:00 2001 From: LeDragoX Date: Fri, 15 Jan 2021 15:38:01 -0300 Subject: [PATCH] Make WSL 2 Intall after Enabling Features --- scripts/all-in-one-tweaks.ps1 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/all-in-one-tweaks.ps1 b/scripts/all-in-one-tweaks.ps1 index 4e40dd7..b317d71 100644 --- a/scripts/all-in-one-tweaks.ps1 +++ b/scripts/all-in-one-tweaks.ps1 @@ -715,7 +715,7 @@ function RemoveBloatwareApps { } -function InstallGamingFeatures { +function EnableFeatures { TitleWithContinuousCounter -Text "Install additional features for Windows" @@ -729,6 +729,9 @@ function InstallGamingFeatures { "IIS-ASPNET" "IIS-ASPNET45" "DirectPlay" + # WSL 2 Support Full Install + "Microsoft-Windows-Subsystem-Linux" + "VirtualMachinePlatform" ) foreach ($Feature in $FeatureName) { @@ -746,6 +749,14 @@ function InstallGamingFeatures { Write-Host "" } + # WSL 2 Setup Finish + Push-Location "$env:SystemDrive\" + Start-BitsTransfer -Source "https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi" -Destination "wsl_update_x64.msi" + Start-Process .\wsl_update_x64.msi '/q /norestart' -Wait + Pop-Location + + wsl --set-default-version 2 + } RunDebloatSoftwares # Run WinAeroTweaker and ShutUp10 with personal configs. @@ -754,4 +765,4 @@ RunTweaksForService # Enable essential Services and Disable bloating Ser RunTweaksForRegistry # Disable Registries that causes slowdowns RunPersonalTweaks # The icing on the cake, last and useful optimizations RemoveBloatwareApps # Remove the main Bloat from Pre-installed Apps -InstallGamingFeatures # Enable features claimed as Optional on Windows, but actually, they are useful \ No newline at end of file +EnableFeatures # Enable features claimed as Optional on Windows, but actually, they are useful \ No newline at end of file