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-1.25.7 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta41 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta40 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-1.25.6 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-1.25.5 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta39 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta38 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-1.25.4 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta37 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta36 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta35 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta34 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta33 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-1.25.3 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-1.25.2 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-1.25.1 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta32 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta31 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta30 lib/specinfra/backend/powershell/support/find_installed_application.ps1
specinfra-2.0.0.beta29 lib/specinfra/backend/powershell/support/find_installed_application.ps1