


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. IIS can be installed programmatically using DISM. One (of many) programmatic ways is to check if the file C:\Windows\System32\inetsrv\w3wp.exeĮxists, and maybe has a certain minimum version (such as 10.0.0.0 for IIS version 10).

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