我试图通过下面的安装脚本在Windows 2012 (IISV8.5)中创建IISSetup,但是引发错误“无效类字符串”。代码:
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;发布于 2019-05-08 09:05:23
我在WindowsServer2008ServicePack 1的WindowsServer2008ServiceEnterprise上也有同样的问题。
procedure TForm1.Button1Click(Sender: TObject);
var
iis: OleVariant;
begin
iis := CreateOleObject('IISNamespace');
end;

对我来说,解决方案是缺少IIS功能。必须安装IIS 6。
(德国版,不懂英语)
我不确定,但“IIS6-Scriptingtools”就足够了。

https://stackoverflow.com/questions/25617718
复制相似问题