I have made a WiX-Bootstrapper bundle with some prerequisites, per example IIS Express 8.0. On a virtual machine the installation of IIS goes well. In the next step, i want to activate some of the IIS-features. So i tried the following lines in the Product.wxs of the MSI-project:
<Product>
[...]
<Property Id="INSTALLIISPROP"
Value="C:\Windows\System32\dism.exe"></Property>
<CustomAction Id="InstallIISCA"
Return="check"
Property="INSTALLIISPROP"
Execute="deferred"
HideTarget="yes"
Impersonate="yes"
ExeCommand="/Online /Enable-Feature /FeatureName:IIS-WebServerRole /FeatureName:IIS-WebServer /FeatureName:IIS-CommonHttpFeatures /FeatureName:IIS-StaticContent /FeatureName:IIS-DefaultDocument /FeatureName:IIS-RequestFiltering /FeatureName:IIS-IPSecurity [...]></CustomAction>
<InstallExecuteSequence>
<Custom Action="InstallIISCA"
Before="InstallFinalize">
<![CDATA[NOT Installed AND IISMAJORVERSION]]>
</Custom>
</InstallExecuteSequence>
</Product>
But this does nothing. None of the IIS-features is activated. What have i done wrong?
Here at last the WXS-file for the IIS-Installation:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<util:RegistrySearch Root="HKLM"
Key="SOFTWARE\Microsoft\InetStp\Components"
Value="Install"
Variable="IisExpressX64"
Win64="yes"/>
<util:RegistrySearch Root="HKLM"
Key="SOFTWARE\Microsoft\InetStp\Components"
Value="Install"
Variable="IisExpressX86"/>
<PackageGroup Id="IisExpress_8_0">
<MsiPackage Id="IisExpress8_0_X64"
Cache="yes"
Compressed="yes"
Permanent="yes"
Vital="yes"
SuppressSignatureVerification="yes"
SourceFile=".\Prerequisites\iis\iisexpress_8_0_RTM_x64_de-DE.msi"
InstallCondition="NOT IisExpressX86 AND VersionNT64"/>
<MsiPackage Id="IisExpress8_0_X86"
Cache="yes"
Compressed="yes"
Permanent="yes"
Vital="yes"
SuppressSignatureVerification="yes"
SourceFile=".\Prerequisites\iis\iisexpress_8_0_RTM_x86_de-DE.msi"
InstallCondition="NOT IisExpressX86 AND NOT VersionNT64"/>
</PackageGroup>
</Fragment>
</Wix>
And it is referenced in the Bundle.wxs:
<PackageGroupRef Id='IisExpress_8_0'/>