【发布时间】:2012-02-23 15:19:32
【问题描述】:
您好,我正在使用以下代码在 Windows 7 中启用 IIS 7.5。它工作正常。但问题是每次运行安装程序(.MSi)时,IIS安装和卸载时间也启用了IIS7.5,如何设置条件来检查iis7.5是否被禁用然后我想安装IIS。我正在使用 wix3.5
请帮帮我。
<CustomAction Id="InstallIISCA" PatchUninstall="no" Return="check" Property="INSTALLIISPROP" Execute="oncePerProcess" HideTarget="yes" Impersonate="yes"
ExeCommand=" /Online /Enable-Feature /FeatureName:IIS-WebServerRole /FeatureName:IIS-ApplicationDevelopment /FeatureName:IIS-ASPNET /FeatureName:IIS-IIS6ManagementCompatibility /FeatureName:IIS-WebServerManagementTools /FeatureName:IIS-ISAPIFilter /FeatureName:IIS-ISAPIExtensions /FeatureName:IIS-NetFxExtensibility /FeatureName:IIS-WindowsAuthentication /FeatureName:IIS-IISCertificateMappingAuthentication /FeatureName:IIS-IPSecurity /FeatureName:IIS-ISAPIExtensions /FeatureName:IIS-ISAPIFilter /FeatureName:IIS-ManagementConsole "/>
<InstallExecuteSequence>
<Custom Action="InstallIISCA" Before="ConfigureIIs" />
</InstallExecuteSequence>
<Property Id="INSTALLIISPROP" Value="dism.exe"></Property>
【问题讨论】: