Find out if IIS is installed by examining the Registry

99封情书 提交于 2019-12-06 12:14:42

问题


I have an innosetup installer that needs to create an IIS Virtual Directory. In order to create the virtual directory, IIS Management Service must be enabled.

How do I check which Windows Features are enabled? The best solution would be to check a registry setting, but other methods that are possible via innosetup are fine.

The solution should work with XP, Vista, Win7, Win2003 server and Win2008 server (32 and 64 bit).


回答1:


I don't know offhand how to generically tell which features are installed. In the specific case of IIS, you can tell by looking for this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp

IIS is installed if that key exists. If the key is missing, IIS is not installed.

More details here.



来源:https://stackoverflow.com/questions/7601605/find-out-if-iis-is-installed-by-examining-the-registry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!