Sha256: 1a682223175c78b5eb6cabb7ae75dbb7375fc2781c22ec1e7b31124e920e1024

Contents?: true

Size: 769 Bytes

Versions: 201

Compression:

Stored size: 769 Bytes

Contents

function FindInstalledApplication
{
  param($appName, $appVersion)
    
  if ((Get-WmiObject win32_operatingsystem).OSArchitecture -notmatch '64')  
  { 
      $keys= (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*') 
  }  
    else  
  { 
      $keys = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*') 
  }   

  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

201 entries across 201 versions & 1 rubygems

Version Path
specinfra-2.21.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.21.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.20.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.20.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.20.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.19.6 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.19.5 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.19.4 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.19.3 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.19.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.19.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.19.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.18.3 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.18.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.18.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.18.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.17.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.17.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.16.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.15.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1