使用Inno Setup安装IIS [英] Install IIS with Inno Setup

查看:827
本文介绍了使用Inno Setup安装IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Inno安装程序安装IIS,但是我遇到了各种错误。

I'm trying install IIS with Inno Setup, but I'm getting various errors.

我在DOS上尝试了命令并运行:

I tried command on DOS and works:


start / w pkgmgr / iu:IIS-WebServerRole; IIS-WebServer; IIS-CommonHttpFeatures; IIS-ManagementService; IIS-CGI; IIS -RequestFiltering; IIS-ASPNET; IIS-HttpLogging; IIS-NetFxExtensibility; IIS-HttpErrors; IIS-DefaultDocument; IIS-ISAPIExtensions; IIS-ISAPIFilter; IIS-StaticContent; IIS-ManagementConsole; IIS-DirectoryBrowsing; IIS-WindowsAuthentication; IIS-Web服务器;

我试过在Inno Setup中使用它:

I tried use this in Inno Setup:


文件名:pkgmgr;参数:/ iu:IIS-WebServerRole; IIS-WebServer :; IIS-CommonHttpFeatures :; IIS-ManagementService :; IIS-CGI :; IIS-RequestFiltering :; IIS-ASPNET :; IIS-HttpLogging :; IIS-NetFxExtensibility :; IIS-HttpErrors :; IIS-DefaultDocument :; IIS-ISAPIExtensions :; IIS-ISAPIFilter :; IIS-StaticContent :; IIS-ManagementConsole :; IIS-DirectoryBrowsing :; IIS-WindowsAuthentication :; IIS-WebServer:;

但它显示错误


操作失败,0x80070057参数不正确

Operation failed with 0x80070057 The parameter is incorrect

尝试后:

文件名:pkgmgr;参数:/ iu:IIS-WebServerRole; IIS-WebServer; IIS-CommonHttpFeatures; IIS-ManagementService; IIS-CGI; IIS-RequestFiltering; IIS-ASPNET; IIS-HttpLogging; IIS-NetFxExtensibility; IIS-HttpErrors; IIS-DefaultDocument; IIS-ISAPIExtensions; IIS-ISAPIFilter; IIS-StaticContent; IIS-ManagementConsole; IIS-DirectoryBrowsing; IIS-WindowsAuthentication; IIS-WebServer;;

但显示错误


操作失败,出现0x8007000B试图加载程序错误格式

Operation failed with 0x8007000B An attempt was made to load a program with an incorrect format

感谢帮助。

推荐答案

您的第一个语法只是使用了错误的参数格式(明显不同于命令行中适合您的参数)。

Your first syntax simply uses a wrong format of the arguments (clearly different to what works for you on command-line).

第二种语法的问题可能是您在64位Windows上运行安装程序。 Inno Setup安装程序是32位应用程序,因此它默认情况下会找到32位版本的 pkgmgr C:\ Windows \ SysWOW64 \ PkgMgr.exe ),无法安装64位IIS。

A problem with the second syntax is probably that you run the installer on 64-bit Windows. The Inno Setup installer is 32-bit application, so it will by default find 32-bit version of pkgmgr (C:\Windows\SysWOW64\PkgMgr.exe), which cannot install 64-bit IIS.

有关文件系统重定向器

添加标志:64位使Inno Setup找到64位版本的 pkgmgr C:\ Windows \ System32 \ PkgMgr.exe )。

Add Flags: 64bit to make Inno Setup find 64-bit version of pkgmgr (C:\Windows\System32\PkgMgr.exe).

[Run]
Filename: pkgmgr; \
    Parameters: "/iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-ManagementService;IIS-CGI;IIS-RequestFiltering;IIS-ASPNET;IIS-HttpLogging;IIS-NetFxExtensibility;IIS-HttpErrors;IIS-DefaultDocument;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-StaticContent;IIS-ManagementConsole;IIS-DirectoryBrowsing;IIS-WindowsAuthentication;IIS-WebServer"; \
    Flags: 64bit






To在32位和64位版本的Windows上启用安装,您需要在 [运行] 部分中有两个条目,一个用于32位,一个用于64-使用检查:不是IsWin64 分别选择正确的一个。检查:IsWin64


To enable installation on both 32-bit and 64-bit versions of Windows, you need to have two entries in [Run] section, one for 32-bit and one for 64-bit and select the correct one using Check: not IsWin64 and Check: IsWin64 respectively.

[Run]
Filename: pkgmgr; \
    Parameters: "..."; \
    Check: not IsWin64
Filename: pkgmgr; \
    Parameters: "..."; \
    Flags: 64bit; Check: IsWin64






或使用 64位安装模式

它会让Inno Setup自动找到 pkgmgr 的正确版本。

It will make Inno Setup find a correct version of pkgmgr automatically.

这篇关于使用Inno Setup安装IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆