From d2ccec5689f94119cd0ec284b559b1ff2752d6bd Mon Sep 17 00:00:00 2001 From: LeDragoX Date: Wed, 20 Jan 2021 16:19:01 -0300 Subject: [PATCH] Move WSL 2 configs after the install of the Feature (not Before) --- scripts/all-in-one-tweaks.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/all-in-one-tweaks.ps1 b/scripts/all-in-one-tweaks.ps1 index 9f94c45..4cf80b6 100644 --- a/scripts/all-in-one-tweaks.ps1 +++ b/scripts/all-in-one-tweaks.ps1 @@ -808,14 +808,6 @@ function EnableFeatures { "Microsoft-Windows-Subsystem-Linux" "VirtualMachinePlatform" ) - - If ([System.Environment]::OSVersion.Version.Build -eq 14393) { - # 1607 needs developer mode to be enabled - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowDevelopmentWithoutDevLicense" -Type DWord -Value 1 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowAllTrustedApps" -Type DWord -Value 1 - } - - wsl --set-default-version 2 foreach ($Feature in $FeatureName) { $FeatureDetails = $(Get-WindowsOptionalFeature -Online -FeatureName $Feature) @@ -832,6 +824,14 @@ function EnableFeatures { Write-Host "" } + If ([System.Environment]::OSVersion.Version.Build -eq 14393) { + # 1607 needs developer mode to be enabled + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowDevelopmentWithoutDevLicense" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowAllTrustedApps" -Type DWord -Value 1 + } + + wsl --set-default-version 2 + } RunDebloatSoftwares # Run WinAeroTweaker and ShutUp10 with personal configs.