Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9238961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:52:47+00:00 2026-06-18T07:52:47+00:00

I wrote a WiX custom MBA that I have been using which embeds all

  • 0

I wrote a WiX custom MBA that I have been using which embeds all of the setup packages (msis, cabs and exes) I need for my installation. However I would now like to make a lightweight web bootstrapper which will download the packages that need to be installed. I thought you would get that for free with the underlying WiX bootstrapper engine, but I guess I was wrong.

I tried subscribing to the ResolveSource event to get a package’s download url and download it to the local source location, but it seems like at that point it’s too late in the process as my installation fails with an error “Failed to resolve source for file: ” (even though the download is successful).

Sample of what I tried:

private void OnResolveSource(object sender, ResolveSourceEventArgs e)
{  
    string localSource = e.LocalSource;
    string downloadSource = e.DownloadSource;

    if (!File.Exists(localSource) && !string.IsNullOrEmpty(downloadSource))
    {
        try
        {
            using (WebClient webClient = new WebClient())
            {
                webClient.DownloadFile(e.DownloadSource, e.LocalSource);
            }
        }

        catch (ArgumentNullException ex)
        {
            e.Result = Result.Error;
        }

        catch (WebException ex)
        {
            e.Result = Result.Error;
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:52:48+00:00Added an answer on June 18, 2026 at 7:52 am

    Thanks to Rob Mensching answering this on the wix-users mailing list:

    Make sure your packages of URLs provided (authored is easiest but you can
    programmatically set them all) then return IDDOWNLOAD from the
    ResolveSource call.

    I edited my code as follows:

    private void OnResolveSource(object sender, ResolveSourceEventArgs e)
    {
        if (!File.Exists(e.LocalSource) && !string.IsNullOrEmpty(e.DownloadSource))
            e.Result = Result.Download;
    }
    

    Setting the result to Result.Download instructs the bootstrapper engine to download the package. No need to try to download the file myself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WiX project that I am working on which includes a Windows
I'm writing a WIX script. I have a custom-action that adds rows dynamically to
We currently have a Database Project, which we wrote a WIX Installer for to
I have an msi (authored with WIX) that has a check box bound to
I am writing an installer using Wix 3 which installs a plugin to a
Wrote a custom backend component, been working fine. A subset of users were only
Wrote this program which should be able to print out all lines from a
I wrote some test code that compares the speed of using the append() method
I have such a scenario for our installer project using WIX 3.6: we want
I have the following WiX code that registers a COM server component <Component Id=ServerComponent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.