title: How to programmatically determine installed IIS version
body: <p>What would the preferred way of programmatically determining which the currently installed version of Microsoft Internet Information Services (IIS) is?</p>
  
  <p>I know that it can be found by looking at the MajorVersion key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters. </p>
  
  <p>Would this be the <em>recommended</em> way of doing it, or is there any safer or more beautiful method available to a .NET developer?</p>