I am a bit confused by the method Engine.SetDownloadSource(). What I am trying to do is change the download URL for the bundled packages from an external website to an internal one. (If there is an easier way to do this, I am open to other suggestions).
Now for the problem. When calling this method it is asking for a user and password. I am not sure where I should get this info from.
string downloadSource = Path.Combine(WebSitePath(), "WebSetup/WebSetupData/", Path.GetFileName(args.DownloadSource));
Engine.SetDownloadSource(args.PackageOrContainerId, args.PayloadId, downloadSource, user, password);
WebSitePath() simply returns the base URL for the website. I can't find any hint about what username and password the MBA would use if I didn't change the link, and likewise I am not sure how to tell it to use the current windows user to download from the new link. Any help would be greatly appreciated.
Username and password are optional to support basic or digest HTTP authorization. Set them to null if you don't want to provide a user/password combination.
来源:https://stackoverflow.com/questions/13346168/wix-managedbootstrapper-setdownloadsource-confusion