http://community.flexerasoftware.com/showthread.php?200816-Installing-IIS-as-a-Prerequisite-on-x64-OSs有一种方法用于设置安装 WAM 的新先决条件文件 (.PRQ)和 IIS。我将代码放在这里以供后代使用:
PRQ 文件
<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
<operatingsystemconditions>
<operatingsystemcondition MajorVersion="6" MinorVersion="1" PlatformId="2" CSDVersion="" Bits="4" ProductType="1"></operatingsystemcondition>
<operatingsystemcondition MajorVersion="6" MinorVersion="0" PlatformId="2" CSDVersion="" Bits="4" ProductType="2|3"></operatingsystemcondition>
<operatingsystemcondition MajorVersion="6" MinorVersion="1" PlatformId="2" CSDVersion="" Bits="4" ProductType="2|3"></operatingsystemcondition>
</operatingsystemconditions>
<files>
<file LocalFile=".\Microsoft IIS\InstallWASandIIS.bat" CheckSum="3205F5B453D8E5FA8795280455BC6B97" FileSize="0,1983"></file>
</files>
<execute file="InstallWASandIIS.bat" returncodetoreboot="-1"></execute>
<properties Id="{9724DBFD-9103-404F-BD53-6B29358C85EF}" Description="This prerequisite installs Windows Process Activation Services (WAS) and Microsoft Internet Information Services (IIS) on Windows 7 x64, Windows Server 2008 x64 and Windows Server 2008 R2 x64 operating systems for MET/TEAM."></properties>
<behavior Reboot="32"></behavior>
</SetupPrereq>
英美烟草文件
@echo 关闭 cls
@回声。@echo Windows Process Activation Services (WAS) 和 Microsoft Internet Information @echo Services (IIS) 必须安装在此计算机上,它才能托管
@echo MET/TEAM 网站。如果这台计算机上已经安装了 WAS 和 IIS,
@echo 这个过程只是确保安装了所有必要的组件。@回声。@回声。@echo 安装 Windows 进程激活服务 - 请等待启动 /w %WINDIR%\sysnative\pkgmgr /l:%TEMP%\InstallWAS.log /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS -配置API;
if NOT ERRORLEVEL 0 (@echo.
@echo 安装 Windows Process Activation Services 时发生错误 - ERRORLEVEL% @echo 请参阅日志文件 %TEMP%\InstallWAS.log
@echo 了解更多信息。@echo.pause EXIT)
@回声。@echo 安装 Microsoft Internet 信息服务 - 请稍候... start /w %WINDIR%\sysnative\pkgmgr /l:%TEMP%\InstallIIS.log /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-静态内容;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-RequestMonitor; IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;WAS- WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;如果不是 ERRORLEVEL 0 (@echo.
@echo 安装 Microsoft Internet 信息服务时出错 - %ERRORLEVEL% @echo
有关详细信息,请参阅日志文件 %TEMP%\InstallIIS.log @echo。@回声。暂停退出)
@回声。
@echo 安装成功!@回声。出口
谢谢你,ACordner,无论你现在在哪里 :-)