1

How can I check that IIS7 is installed under OS ?

I am in .net 4.0

Thanks .

Shai
  • 25,159
  • 9
  • 44
  • 67
Night Walker
  • 20,638
  • 52
  • 151
  • 228
  • Programatically, that is? Possible [duplicate](http://stackoverflow.com/questions/435050/how-to-determine-installed-iis-version) – Shai Feb 27 '12 at 11:16
  • There are a number of approaches suggested at http://stackoverflow.com/questions/446390/how-to-detect-iis-version-using-c – kaj Feb 27 '12 at 11:18

3 Answers3

0

You could do the following

string w3wp = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.System), "inetsrv\w3wp.exe");
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(w3wp);
Console.WriteLine(versionInfo.FileMajorPart);

You could also check Windows Registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters for the Major Version.

MWS
  • 103
  • 1
  • 7
-2

You can go to Start --> Run and type inetmgr and enter which would open up your IIS and you can check the version there.

Ravi Vanapalli
  • 9,805
  • 3
  • 33
  • 43