Module: Facter::Util::Registryiis

Defined in:
lib/facter/util/registryiis.rb

Class Method Summary collapse

Class Method Details

.iis_version_string_from_registryObject



2
3
4
5
6
7
8
9
# File 'lib/facter/util/registryiis.rb', line 2

def self.iis_version_string_from_registry
  require 'win32/registry'
  Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Microsoft\InetStp')['VersionString']
rescue Win32::Registry::Error => e
  Facter.debug "Accessing SOFTWARE\\Microsoft\\InetStp gave an error: #{e}"
  Facter.debug 'IIS is probably not installed'
  nil
end