【发布时间】:2016-03-30 12:38:30
【问题描述】:
我在我的托管引导程序 (MBA) 中提供 3 个 msi 包。用户可以选择他们想要安装的软件包。一切顺利。当用户尝试从控制面板修改安装时,从对话框中选择新包并且原始源 (MBA.exe) 丢失,安装失败并显示以下日志:
[553C:0A88][2016-03-30T16:00:54]w341: Prompt for source of container: WixAttachedContainer, path: D:\work\MBA.Install.Bundle\bin\Debug\MBA.exe<br/>
[553C:0A88][2016-03-30T16:00:54]e054: Failed to resolve source for file: D:\work\MBA.Install.Bundle\bin\Debug\MBA.exe, error: 0x80070002.
[553C:0A88][2016-03-30T16:00:54]e000: Error 0x80070002: Failed while prompting for source (original path 'D:\work\MBA.Install.Bundle\bin\Debug\MBA.exe').
[553C:0A88][2016-03-30T16:00:54]e311: Failed to acquire container: WixAttachedContainer to working path: C:\Users\Me\AppData\Local\Temp\{1338381A-F85F-4B6D-83EA-A0A2D1A369C1}\10A35D6D6CAC04B3DC248033B1588CBD67AD698B, error: 0x80070002.
[553C:0A88][2016-03-30T16:00:54]i000: CachePackageComplete: Pkg_Id=EMS.Server Resulted=None
[553C:0A88][2016-03-30T16:00:54]i000: CacheComplete: Status=-2147024894
[553C:3C24][2016-03-30T16:00:54]e000: Error 0x80070002: Failed while caching, aborting execution.
我试图在ResolveSource 事件处理程序中捕捉到这一点。 e.LocalSource 和 e.DownloadSource 是只读属性。没有下载丢失文件的标准,所有文件都需要在本地存在。
我在这里阅读了有关获取原始安装程序源的提示: https://blogs.msdn.microsoft.com/heaths/2007/10/25/resolvesource-requires-source/
但这是关于 msi 安装程序的,而在我的 MBA 中,此对话框被禁止。
问题:
- 如何手动设置
LocalSource(可能是通过用户对话输入)? - 我可以在运行时将
WixAttachedContainer设置为其他一些工作路径,但接受用户的输入吗? - 我们可以在运行时设置
Engine.SetLocalSource()吗?
非常感谢...
【问题讨论】:
标签: wix bootstrapper burn