Sha256: 8418a8648992f585da582031838924e6fa71413e8ec485734c4c883756b6e991
Contents?: true
Size: 1.27 KB
Versions: 243
Compression:
Stored size: 1.27 KB
Contents
function FindInstalledApplication { param($appName, $appVersion) if ((Get-WmiObject win32_operatingsystem).OSArchitecture -notmatch '64') { $keys= (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*') $possible_path= 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' if (Test-Path $possible_path) { $keys+= (Get-ItemProperty $possible_path) } } else { $keys = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*') $possible_path= 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' if (Test-Path $possible_path) { $keys+= (Get-ItemProperty $possible_path) } $possible_path= 'HKCU:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' if (Test-Path $possible_path) { $keys+= (Get-ItemProperty $possible_path) } } if ($appVersion -eq $null) { @($keys | Where-Object {$_.DisplayName -like $appName -or $_.PSChildName -like $appName}).Length -gt 0 } else{ @($keys | Where-Object {$_.DisplayName -like $appName -or $_.PSChildName -like $appName } | Where-Object {$_.DisplayVersion -eq $appVersion} ).Length -gt 0 } }
Version data entries
243 entries across 243 versions & 3 rubygems