title: Using WiX, how can I download a dependency when the initial URL failed to download
body: <p>I'd like to provide my WiX bundle an alternate download(s) URL for grabbing dependencies. I haven't been able to track down documentation on this scenario, so I don't even know if it's possible outside of a hackish Custom Action workaround. Right now, when any attempted download fails, the installation fails, as intended. I'd like it to simply try the next URL(s) with public or internal mirrors if the initial attempt fails until it either succeeds or hard-fails from none of them working. I already have normal dependency packages implemented. I'm just not sure where to go from here to achieve this design. I'd like to do it outside of custom actions, if possible.</p>
  
  <p>Current code example:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
       xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"&gt;
      &lt;Fragment&gt;
  &lt;!-- Check registry keys for Microsoft Visual C++ 2005 Redistributable --&gt;
      &lt;util:RegistrySearch Root="HKLM"
                           Key="SOFTWARE\Classes\Installer\Products\1af2a8da7e60d0b429d7e6453b3d0182"
                           Result="exists"
                           Variable="MVC2005Present_x64"
                           Win64="yes"/&gt;
  
  &lt;!-- Package to deploy Microsoft Visual C++ 2005 Redistributable (x64) --&gt;
        &lt;ExePackage Id="MVC2005Exe_x64"
                    Name="Microsoft Visual C++ 2005 Redistributable Package (x64)"
                    Cache="no"
                    Compressed="no"
                    PerMachine="yes"
                    DownloadUrl="https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x64.EXE"
                    Permanent="yes"
            InstallCommand="/q"
            RepairCommand="/q"
            DetectCondition="MVC2005Present_x64"
            InstallCondition="DeployDependencies = 1"&gt;
          &lt;RemotePayload CertificatePublicKey="5C499B10F7EF186DC729991A262AB52066423909"
                         CertificateThumbprint="93859EBF98AFDEB488CCFA263899640E81BC49F1"
                         Description="Microsoft Visual C++ 2005 Redistributable (x64) Setup"
                         Hash="EE916012783024DAC67FC606457377932C826F05"
                         ProductName="Microsoft Visual C++ 2005 Redistributable (x64)"
                         Size="3175832"
                         Version="6.0.2900.2180" /&gt;
          &lt;ExitCode Behavior="scheduleReboot" Value="1641" /&gt;
          &lt;ExitCode Behavior="scheduleReboot" Value="3010" /&gt;
        &lt;/ExePackage&gt;
      &lt;/Fragment&gt;
    &lt;/Wix&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/OTKG9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OTKG9.png" alt="enter image description here"></a></p>