Move WSL 2 configs after the install of the Feature (not Before)

main
LeDragoX 4 years ago committed by Plínio Larrubia
parent 736045ec00
commit d2ccec5689
No known key found for this signature in database
GPG Key ID: 057B0A87CB137C69

@ -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.

Loading…
Cancel
Save