```ruby
Facter.add(:iis_version) do
  confine :kernel => :windows
  setcode do
	version = nil
	require 'win32/registry'
	begin
	Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Microsoft\InetStp') do |reg|
	version = reg['VersionString']
	 version = version[8,3]
	end
rescue Win32::Registry::Error
end
version
end
end```

Change to handle versionnumbers abbove 10
user
```ruby
Facter.add(:iis_version4) do
  confine :kernel => :windows
  setcode do
	version = nil
	require 'win32/registry'
	begin
	Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Microsoft\InetStp') do |reg|
	version = reg['VersionString']
	 version = version[8..-1]
	end
rescue Win32::Registry::Error
end
version
end
end```
assistant