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

@ -809,14 +809,6 @@ function EnableFeatures {
"VirtualMachinePlatform" "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) { foreach ($Feature in $FeatureName) {
$FeatureDetails = $(Get-WindowsOptionalFeature -Online -FeatureName $Feature) $FeatureDetails = $(Get-WindowsOptionalFeature -Online -FeatureName $Feature)
@ -832,6 +824,14 @@ function EnableFeatures {
Write-Host "" 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. RunDebloatSoftwares # Run WinAeroTweaker and ShutUp10 with personal configs.

Loading…
Cancel
Save