Inno安装程序CreateOleObject('IISNamespace')在Windows Server 2012上引发异常 [英] Inno Setup CreateOleObject('IISNamespace') throws exception on Windows Server 2012
本文介绍了Inno安装程序CreateOleObject('IISNamespace')在Windows Server 2012上引发异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试通过以下安装脚本在Windows Server 2012(IIS版本8.5)中创建IISSetup,但抛出错误无效的类字符串". 代码:
I am trying to create IISSetup in the Windows Server 2012 (IIS version 8.5) through the below install script but throws error "Invalid class string". code:
var
IIS, WebSite, WebServer, WebRoot, VDir: Variant;
ErrorCode: Integer;
begin
{ Create the main IIS COM Automation object }
try
IIS := CreateOleObject('IISNamespace');
except
RaiseException(
'Please install Microsoft IIS first.'#13#13'(Error ''' +
GetExceptionMessage + ''' occurred)');
end;
end;
推荐答案
在带有Service Pack 1的Windows Server 2008 R2 Enterprise上,我遇到了同样的问题.
I had the same issue on a Windows Server 2008 R2 Enterprise with Service Pack 1.
procedure TForm1.Button1Click(Sender: TObject);
var
iis: OleVariant;
begin
iis := CreateOleObject('IISNamespace');
end;
对我来说,解决方案是缺少IIS功能.必须安装IIS 6的东西.
The solution for me was a missing IIS feature. One has to install the IIS 6 thingy.
(德语版本,不懂英语)
(germany version, don't know english)
- IIS6-Verwaltungskompatibilität
- IIS6-Metabasiskompatibilität
- IIS6-WMI-Kompatibilität
- IIS 6脚本工具
- IIS 6-Verwaltungskonsole
- IIS 6-Verwaltungskompatibilität
- IIS 6-Metabasiskompatibilität
- IIS 6-WMI-Kompatibilität
- IIS 6-Scriptingtools
- IIS 6-Verwaltungskonsole
我不确定,但是"IIS 6-Scriptingtools"应该足够了.
I am not sure but "IIS 6-Scriptingtools" should be enough.
这篇关于Inno安装程序CreateOleObject('IISNamespace')在Windows Server 2012上引发异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文