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.30.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.30.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.30.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.29.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.28.4 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.28.3 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.28.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.28.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.28.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.27.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.27.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.26.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.26.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.25.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.25.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.24.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.24.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.24.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.23.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.22.0 lib/specinfra/backend/powershell/support/find_installed_application.ps1