What is the proper way to download setup packages in a WiX custom managed bootstrapper application?

谁都会走 提交于 2019-12-04 12:33:20

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!