How can I check that IIS7 is installed under OS ?
I am in .net 4.0
Thanks .
How can I check that IIS7 is installed under OS ?
I am in .net 4.0
Thanks .
mmmmm looks like you need to search google
http://www.codeproject.com/Articles/18301/Using-Managed-Code-to-Detect-if-IIS-is-Installed-a
http://blogs.iis.net/chrisad/archive/2006/09/01/Detecting-if-IIS-is-installed_2E002E002E00_.aspx
http://geekswithblogs.net/sdorman/archive/2007/03/01/107732.aspx
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.
You can go to Start --> Run and type inetmgr and enter which would open up your IIS and you can check the version there.