简体   繁体   中英

Wix Installer with WPF UI not running MSI

I am currently building a WiX project which is supposed to act as a delivery wrapper for other installers- this way I can make a msi for any project, wrap it in this project, and have a new installer.

At the moment, I am experimenting with a pair of very basic installers- when they install, they should create a folder and place four empty text files in the folder. The top level wxs file is below.

<?xml version="1.0" encoding="UTF-8"?>
<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="Jeremiah's Test Installer" Version="1.0.0.0" Manufacturer="Starkey" UpgradeCode="5a714642-7857-4582-8bae-80fd6d8ec77a">
    <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
      <Payload SourceFile="..\TestWPF003\BootstrapperCore.config"/>
      <Payload SourceFile="..\TestWPF003\bin\Release\TestWPF003.dll"/>
      <Payload SourceFile="C:\Program Files (x86)\WiX Toolset v3.9\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
    </BootstrapperApplicationRef>

        <Chain>
            <!-- TODO: Define the list of chained packages. -->
            <!-- <MsiPackage SourceFile="path\to\your.msi" /> -->
      <PackageGroupRef Id='Netfx4Full' />      
      <MsiPackage SourceFile="..\beta\bin\Release\beta.msi"  Id="BetaInstallId" Cache="yes" Visible="yes"/>
      <MsiPackage SourceFile="..\alpha\bin\Release\alpha.msi"  Id="AlphaInstallId" Cache="yes" Visible="yes"/>
        </Chain>
    </Bundle>

  <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" />

    <PackageGroup Id="Netfx4Full">
      <ExePackage Id="Netfx4Full" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes"
                  SourceFile="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40\dotNetFx40_Full_x86_x64.exe"
                  DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />
    </PackageGroup>
  </Fragment>

</Wix>

The problem I am coming up against is that the UI will appear, the buttons will trigger, and an entry will be made in the Windows registry saying that the program has been installed. However, when I go to look for the files, nothing will be there. I can sweep my system for the file and folder names, but they will not be present anywhere. If I run the installers on their own, the folders are created and the files are present.

Edit: Installation Log - http://pastebin.com/cMFei9cr

According to the log, the bundle thinks that the packages are already installed so it doesn't try to install them again ( execute:None ).

Planned package: BetaInstallId, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: Register
Planned package: AlphaInstallId, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: Register

I don't know why there's so many related bundles:

Detected related bundle: {005cc4d6-ddbb-40e6-9b55-1e75c3fd93f7}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {062482ea-7e51-4d0d-bfdb-4da66a31c8d7}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {1c6dc0b9-8d20-4fcc-ba0f-88278407bfd7}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {27a27a66-9612-475b-b4c1-4b0154f2ffc1}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {284b58db-4377-4d3f-81f6-8683960062a8}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {4508d6e7-0b9d-44b5-8270-f5b2e4a9f1eb}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {616c17bc-349a-4fa4-a96d-44089a199e3d}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {85fd546d-8c91-44e1-9fcb-1a84e3727773}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {b48ca10f-ec2e-417e-91e2-d60a85cf08a3}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {c6450493-7e9e-4341-ab20-fece27d7f706}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {daefbdf5-330d-4ab7-b504-629c6d474142}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None
Detected related bundle: {e3eb09bd-6c1e-4969-8298-450e0041d424}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None

I bet it would work on a clean machine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM