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.11.6 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.11.5 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.11.4 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.11.3 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.11.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.11.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.11.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.10.4 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.10.3 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.10.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.10.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.10.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.9.3 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.9.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.9.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.9.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.8.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.7.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.6.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.5.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1