0

bundle.wxs にいくつかの ExecPackages がチェーンされています。.Net Framework 4.0 をインストールするための PackageGroup セクションがあります。これは、PackageGroupRef としてチェーンの先頭にフックされています。ブートストラッパーをダブルクリックすると、.Net Framework インストール ウィンドウがポップアップし、.Net Fwk がインストールされます。.Net のインストール後、ブートストラッパーがマネージド UI を表示し、実際のインストール アクティビティを続行することを期待します。ただし、問題は、.Net フレームワークのインストール後に停止することです。UI がポップアップしてインストールを再開するには、ブートストラップをもう一度実行する必要があります。bundle.wxs の内容は次のようになります。

     <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
             xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" 
             xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
          <Bundle Name="My-Installer" 
                  Version="3.0" 
                  Manufacturer="XXXX"
                  HelpUrl="XXXX"
                  UpdateUrl="XXXX"
                  UpgradeCode="XXXX">
            <!--Compressed="no"-->

            <!--Custom dialog is a WPF form-->
            <BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
              <Payload Name='BootstrapperCore.config' SourceFile='..\MyBootstrapperCustomUI\MyBootstrapperCustomUI\MyBootstrapperCustomUI.BootstrapperCore.config' />
              <Payload SourceFile='..\MyBootstrapperCustomUI\MyBootstrapperCustomUI\bin\$(var.Configuration)\MyBootstrapperCustomUI.dll' />
            </BootstrapperApplicationRef>

            <Chain>
              <PackageGroupRef Id='Netfx4Full' />
              <ExePackage Id="MyPackage1"..../>
              <ExePackage Id="MyPackage2"..../>
            </Chain>
     <Fragment>
         <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
         <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />
         <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"   Value="Version" Variable="Netfx4FullVersion" />
         <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />
         <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v3.5" Value="Version" Variable="Netfx35Version"/>
         <PackageGroup Id="Netfx4Full">
              <ExePackage Id="Netfx35" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" SourceFile="..\MyApp\dotNETFramework3.5SP1\dotnetfx35.exe" Name="MyApp\dotNETFramework3.5SP1\dotnetfx35.exe" DetectCondition="Netfx35Version AND (Netfx35Version &gt;= v3.5.30729.1)" InstallCommand="/q /norestart" UninstallCommand="/q /norestart" 
InstallCondition="(NOT Netfx35Version OR (Netfx35Version &lt; v3.5.30729.1)) AND NOT VersionNT >= v6.0"/><!--donot install if win7-->

              <ExePackage Id="Netfx4Full" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" SourceFile="..\MyApp\dotNETFramework4.0\dotNetFx40_Full_x86_x64.exe" Name="MyApp\dotNETFramework4.0\dotNetFx40_Full_x86_x64.exe" InstallCommand="/passive /norestart" DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />
        </PackageGroup>
      </Fragment>

</Wix>
</Bundle>
4

0 に答える 0