通过检查注册表来了解是否已安装IIS [英] Find out if IIS is installed by examining the Registry
问题描述
我有一个innosetup安装程序,需要创建IIS虚拟目录.为了创建虚拟目录,必须启用IIS管理服务.
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.
如何检查启用了哪些Windows功能?最好的解决方案是检查注册表设置,但是通过innosetup可以使用的其他方法也可以.
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.
该解决方案应与XP,Vista,Win7,Win2003服务器和Win2008服务器(32位和64位)一起使用.
The solution should work with XP, Vista, Win7, Win2003 server and Win2008 server (32 and 64 bit).
推荐答案
我不知道如何直接判断安装了哪些功能. 在IIS的特定情况下,您可以通过查找以下注册表项来识别:
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.如果缺少密钥,则说明未安装IIS.
IIS is installed if that key exists. If the key is missing, IIS is not installed.
这篇关于通过检查注册表来了解是否已安装IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!