From cf336b578ad319d3ac2c17eb50b3822e7d2f8116 Mon Sep 17 00:00:00 2001 From: Chris Long Date: Sun, 15 Nov 2020 08:46:44 -0800 Subject: [PATCH] Actually fix Issue #558 --- Vagrant/prepare.ps1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Vagrant/prepare.ps1 b/Vagrant/prepare.ps1 index 5fcf544..66a851d 100644 --- a/Vagrant/prepare.ps1 +++ b/Vagrant/prepare.ps1 @@ -31,9 +31,14 @@ function install_checker { param( [string]$Name ) - $results = Get-ItemProperty 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' | where { ($_.Publisher -eq 'VMware, Inc.') -OR ($_.Publisher -eq 'Oracle Corporation') -OR ($_.Publisher -eq 'HashiCorp')} | Select-Object DisplayName - $results += Get-ItemProperty 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' | where { ($_.Publisher -eq 'VMware, Inc.') -OR ($_.Publisher -eq 'Oracle Corporation') -OR ($_.Publisher -eq 'HashiCorp') } | Select-Object DisplayName - + $results = @() +Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | + ForEach-Object { + $obj = New-Object psobject + Add-Member -InputObject $obj -MemberType NoteProperty -Name GUID -Value $_.pschildname + Add-Member -InputObject $obj -MemberType NoteProperty -Name DisplayName -Value $_.GetValue("DisplayName") + $results += $obj + } forEach ($result in $results) { if ($result -like "*$Name*") { return $true