Sha256: 67365e2a264d72a5833ebc68180ca516697a59af446bb8d8ca87c30650e52c45

Contents?: true

Size: 612 Bytes

Versions: 381

Compression:

Stored size: 612 Bytes

Contents

class Specinfra::Command::Windows::Base::HotFix < Specinfra::Command::Windows::Base
  class << self
    def check_is_installed(description, hot_fix_id=nil)
      hot_fix_id_match = /(KB\d+)/i.match(description)
      hot_fix_id = hot_fix_id_match ? hot_fix_id_match[1] : description if hot_fix_id.nil?

      args = [ 
        '-description', "'#{description}'",
        '-hotFixId', "'#{hot_fix_id}'"
      ]
 
      cmd = "(FindInstalledHotFix #{args.join(' ')})" 
      Backend::PowerShell::Command.new do
        using 'find_installed_hot_fix.ps1'
        exec "#{cmd} -eq $true"
      end
    end
  end
end

Version data entries

381 entries across 381 versions & 3 rubygems

Version Path
specinfra-2.71.0 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.70.2 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.70.1 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.70.0 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.69.0 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.68.2 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.68.1 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.68.0 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.10 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.9 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.8 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.7 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.6 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.5 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.3 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.2 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.1 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.67.0 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.66.9 lib/specinfra/command/windows/base/hot_fix.rb
specinfra-2.66.8 lib/specinfra/command/windows/base/hot_fix.rb