Sha256: 221c3b5a47667c205cdb4d6c9599eed4bb7ae8d0b7849c3ab461e167329a45ee

Contents?: true

Size: 338 Bytes

Versions: 108

Compression:

Stored size: 338 Bytes

Contents

module Facter::Util::WMI
  class << self
    def connect(uri = wmi_resource_uri)
      require 'win32ole'
      WIN32OLE.connect(uri)
    end

    def wmi_resource_uri( host = '.' )
      "winmgmts:{impersonationLevel=impersonate}!//#{host}/root/cimv2"
    end

    def execquery(query)
      connect().execquery(query)
    end
  end
end

Version data entries

108 entries across 108 versions & 3 rubygems

Version Path
facter-2.4.6 lib/facter/util/wmi.rb
facter-2.4.6-x86-mingw32 lib/facter/util/wmi.rb
facter-2.4.6-x64-mingw32 lib/facter/util/wmi.rb
facter-2.4.6-universal-darwin lib/facter/util/wmi.rb
facter-2.4.5 lib/facter/util/wmi.rb
facter-2.4.5-x86-mingw32 lib/facter/util/wmi.rb
facter-2.4.5-x64-mingw32 lib/facter/util/wmi.rb
facter-2.4.5-universal-darwin lib/facter/util/wmi.rb
facter-2.4.4 lib/facter/util/wmi.rb
facter-2.4.4-x86-mingw32 lib/facter/util/wmi.rb
facter-2.4.4-x64-mingw32 lib/facter/util/wmi.rb
facter-2.4.4-universal-darwin lib/facter/util/wmi.rb
facter-2.4.3 lib/facter/util/wmi.rb
facter-2.4.3-x86-mingw32 lib/facter/util/wmi.rb
facter-2.4.3-x64-mingw32 lib/facter/util/wmi.rb
facter-2.4.3-universal-darwin lib/facter/util/wmi.rb
facter-2.4.1 lib/facter/util/wmi.rb
facter-2.4.1-x86-mingw32 lib/facter/util/wmi.rb
facter-2.4.1-x64-mingw32 lib/facter/util/wmi.rb
facter-2.4.1-universal-darwin lib/facter/util/wmi.rb