[wix-users] Basic question about DownloadUrl

Eric Hackborn eric at builtbywild.com
Wed May 10 13:01:12 PDT 2017


Hi all, I'm just getting started with WiX and there seems to be something
fundamental I'm misunderstanding about DownloadUrl. Based on docs I'm
assuming it means that the exe or msi will be downloaded from the given URL
before installing; seems pretty straightforward. But I can't get it to do
that, it always seems to be including the msi in the bundle exe and not
downloading anything. I've made a bundle that includes a chain with a
single MsiPackage that it should be downloading from a URL, but it always
installs fine, even if the URL is invalid. I have Compressed set to "no"
(and setting it to "yes" does create a slightly smaller bundle exe,
although not by the size of the msi) and a URL supplied, not sure what else
I would need to do.

I was hoping someone could point out something obvious I'm doing wrong.

First I went through the samplefirst tutorial and created an msi from:

<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
  <Product Name='Foobar 1.0' Id={guid}' UpgradeCode='{guid}'
    Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Acme
Ltd.'>
    <Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0
Installer"
      Comments='Foobar is a registered trademark of Acme Ltd.'
Manufacturer='Acme Ltd.'
      InstallerVersion='100' Languages='1033' Compressed='yes'
SummaryCodepage='1252' InstallScope="perMachine" />
    <Condition Message="This application only runs on 64-bit Windows.">
      VersionNT64
    </Condition>
    <Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM
#1" />
    <Property Id='DiskPrompt' Value="Acme's Foobar 1.0 Installation [1]" />
    <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='ProgramFilesFolder' Name='PFiles'>
        <Directory Id='Acme' Name='Acme'>
          <Directory Id='INSTALLDIR' Name='Foobar 1.0'>
            <Component Id='MainExecutable' Guid='{guid}'>
              <File Id='FoobarEXE' Name='FoobarAppl10.exe' DiskId='1'
Source='FoobarAppl10.exe' KeyPath='yes'>
                <Shortcut Id="startmenuFoobar10" Directory="ProgramMenuDir"
Name="Foobar 1.0" WorkingDirectory='INSTALLDIR' Icon="Foobar10.exe"
IconIndex="0" Advertise="yes" />
                <Shortcut Id="desktopFoobar10" Directory="DesktopFolder"
Name="Foobar 1.0" WorkingDirectory='INSTALLDIR' Icon="Foobar10.exe"
IconIndex="0" Advertise="yes" />
              </File>
            </Component>
            <Component Id='HelperLibrary' Guid='{guid}'>
              <File Id='HelperDLL' Name='Helper.dll' DiskId='1'
Source='Helper.dll' KeyPath='yes' />
            </Component>
            <Component Id='Manual' Guid='{guid}'>
              <File Id='Manual' Name='Manual.pdf' DiskId='1'
Source='Manual.pdf' KeyPath='yes'>
                <Shortcut Id="startmenuManual" Directory="ProgramMenuDir"
Name="Instruction Manual" Advertise="yes" />
              </File>
            </Component>
          </Directory>
        </Directory>
      </Directory>
      <Directory Id="ProgramMenuFolder" Name="Programs">
        <Directory Id="ProgramMenuDir" Name="Foobar 1.0">
          <Component Id="ProgramMenuDir" Guid="{guid}">
            <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
            <RegistryValue Root='HKCU'
Key='Software\[Manufacturer]\[ProductName]' Type='string' Value=''
KeyPath='yes' />
          </Component>
        </Directory>
      </Directory>
      <Directory Id="DesktopFolder" Name="Desktop" />
    </Directory>
    <Feature Id='Complete' Level='1'>
      <ComponentRef Id='MainExecutable' />
      <ComponentRef Id='HelperLibrary' />
      <ComponentRef Id='Manual' />
      <ComponentRef Id='ProgramMenuDir' />
    </Feature>
    <Icon Id="Foobar10.exe" SourceFile="FoobarAppl10.exe" />
  </Product>
</Wix>

Then I created a bundle with a chain on the resulting msi:

<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
  <Bundle Name='Acme Bundle' Version='1.0.0' Manufacturer='Acme Ltd.'
UpgradeCode="{guid}" >
    <BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.RtfLicense" />
    <Chain>
      <MsiPackage Id="SampleFirst" Name="SampleFirst.msi"
InstallCondition="VersionNT64" Vital="yes" Compressed="no"
         DownloadUrl="
https://drive.google.com/uc?export=download&id=0B8OA-PU6I-TYOE54eG1zcFQ0d3cTT
">
      </MsiPackage>
    </Chain>
  </Bundle>
</Wix>

Thoughts?

thanks much for any info,
eric


More information about the wix-users mailing list