【问题标题】:Inno setup Classic ASP Enable Parent PathsInno setup Classic ASP 启用父路径
【发布时间】:2013-10-03 19:52:58
【问题描述】:

我已经为一个经典的 asp 网站创建了一个安装程序。 我可以将应用程序添加到 IIS 并设置应用程序池、友好名称和允许脚本。 我也想设置“启用父路径”。

有什么想法吗?有没有 EnableParentPaths = true?

这是我用来将网站添加到 IIS 以备不时之需的 somw 代码:

if (IISOptionsPage.Values[1] <> '') then begin
  IISDefAppPool := IISOptionsPage.Values[1];
end else begin
  IISDefAppPool := ExpandConstant('{#IISDefaultAppPool}');  
end;

{ Create the main IIS COM Automation object }
try
  IIS := CreateOleObject('IISNamespace');
except
  RaiseException('IIS is not installed?.'#13#13'(Error: ''' + GetExceptionMessage );
end;

{ Connect to the IIS server }

WebSite := IIS.GetObject('IIsWebService', IISServerName + '/w3svc');
WebServer := WebSite.GetObject('IIsWebServer', IISServerNumber);
WebRoot := WebServer.GetObject('IIsWebVirtualDir', 'Root');

WebAppName := ExtractLastDir(ExpandConstant('{app}'));

{ (Re)create a virtual dir }

try
  WebRoot.Delete('IIsWebVirtualDir', WebAppName);
  WebRoot.SetInfo();
except

end;

VDir := WebRoot.Create('IIsWebVirtualDir', WebAppName); 
VDir.AccessRead := True;
VDir.AccessScript := True;
VDir.AppFriendlyName := WebAppName;
VDir.Path := ExpandConstant('{app}');

try
  VDir.AppPoolId := IISDefAppPool;
except
  MsgBox('AppPool not set.'#13#13'(Error: ''' + GetExceptionMessage, mbInformation, mb_Ok);
end;

try
  VDir.AppCreate(True);
except
  MsgBox('App not created.'#13#13'(Error: ''' + GetExceptionMessage, mbInformation, mb_Ok);
end;

try
  VDir.SetInfo();
except
  MsgBox('Info no set.'#13#13'(Error: ''' + GetExceptionMessage, mbInformation, mb_Ok);
end;

【问题讨论】:

    标签: iis asp-classic inno-setup


    【解决方案1】:

    我的猜测是您正在寻找 AspEnableParentPaths 对象的 AspEnableParentPaths 属性。尝试使用以下行扩展您的脚本:

    VDir.AspEnableParentPaths := True;
    

    【讨论】:

      猜你喜欢
      • 2023-04-07
      • 1970-01-01
      • 2011-05-01
      • 1970-01-01
      • 2023-03-18
      • 1970-01-01
      • 2012-11-21
      • 2016-12-11
      • 2019-09-28
      相关资源
      最近更新 更多