Check whether IIS is installed or not?

Viewed 226365

I am trying to create a Local IIS Website using ASP.NET.

When I click on New -----> Website and select the type as HTTP and from the dialog box if I select the option as LOCAL IIS WEBSITE I am getting a message as "IIS not installed on this computer"

When I checked in the Control Panel---->Add or remove programs ---->Add or remove windows components. The Option Internet Information Service is already checked marked.

But when I click on the Control Panel ---> Administrative Tools, I dont find the option as Internet Information Service.

I also have the root directory as C:\Inetpub\WWWRoot.

And when I give the following command in the VS command Prompt

aspnet_regiis.exe -i

It is giving the message as finished installing ASP.NET

Can any one help me in identifying whether IIS is installed in my system or not?

Please help me out!

10 Answers

go to Start->Run type inetmgr and press OK. If you get an IIS configuration screen. It is installed, otherwise it isn't.

You can also check ControlPanel->Add Remove Programs, Click Add Remove Windows Components and look for IIS in the list of installed components.

EDIT


To Reinstall IIS.

Control Panel -> Add Remove Programs -> Click Add Remove Windows Components
Uncheck IIS box

Click next and follow prompts to UnInstall IIS. Insert your windows disc into the appropriate drive.

Control Panel -> Add Remove Programs -> Click Add Remove Windows Components
Check IIS box

Click next and follow prompts to Install IIS.

A lot of answers here describe how to manually check if IIS is installed.

One (of many) programmatic ways is to check if the file

C:\Windows\System32\inetsrv\w3wp.exe

exists, and maybe has a certain minimum version (such as 10.0.0.0 for IIS version 10).

IIS can be installed programmatically using DISM. You can also use DISM to check if IIS is installed, which may be "more correct", but is also more difficult to do than just checking for a file.

WARNING: If possible, do not hard-code the path C:\Windows\System32, especially not within a 32-bit process or installer, as it can be virtualized and mapped to C:\Windows\SysWOW64, which is NOT where IIS is installed (assuming a 64-bit OS). Depending on where you are implementing your check (installer prerequisites, PowerShell, native code, etc.), there are different ways to explicitly access the 64-bit/native system folder.

Background: w3wp.exe is the worker process image of IIS, so if IIS is installed with minimal features, then this file can be expected to exist.

As for version numbers, you can expect the following minimum versions of IIS to be installed in (source):

  • IIS 10 (>= 10.0.0.0) in Windows Server 2016 or higher and Windows 10 or higher
  • IIS 8.5 (>= 8.5.0.0) in Windows Server 2012 R2 or higher and Windows 8.1 or higher

I needed to do this on a server over the CLI, and was able to do so in using powershell wit the following command:

Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\ | Select-Object
Related