diff --git a/Server/wwwroot/Downloads/Install-Win10-x86.ps1 b/Server/wwwroot/Downloads/Install-Win10-x86.ps1 index a52afd80..f80b069b 100644 --- a/Server/wwwroot/Downloads/Install-Win10-x86.ps1 +++ b/Server/wwwroot/Downloads/Install-Win10-x86.ps1 @@ -126,13 +126,7 @@ function Install-Remotely { } function Install-DesktopRuntime() { - $UninstallKeys = New-Object System.Collections.ArrayList - Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" | ForEach-Object { - $UninstallKeys.Add($_) | Out-Null - } - Get-ChildItem -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\" | ForEach-Object { - $UninstallKeys.Add($_) | Out-Null - } + $UninstallKeys = (Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\") $RuntimeRegKey = $UninstallKeys | Where-Object { $_.GetValue("DisplayName") -like "Microsoft Windows Desktop Runtime - 3.1.1*"