wix - 托管 Bootstrap : Failed while prompting for source

标签 wix bootstrapper burn

我在我的托管 Bootstrap (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.LocalSourcee.DownloadSource 是只读属性。没有下载丢失文件的条件,所有文件都需要在本地存在。

我在这里阅读了有关获取原始安装程序源的提示: https://blogs.msdn.microsoft.com/heaths/2007/10/25/resolvesource-requires-source/

但这是关于 msi 安装程序的,而在我的 MBA 中,这个对话框被抑制了。

问题:

  1. 如何手动设置 LocalSource(可能是通过用户对话框获取输入)?
  2. 我可以在运行时将 WixAttachedContainer 设置为其他工作路径但从用户那里获取输入吗?
  3. 我们可以在运行时设置 Engine.SetLocalSource() 吗?

非常感谢...

最佳答案

在阅读了其他帖子和来自 Wix-Users 电子邮件列表的一个很好的回复之后,我得到了部分成功的想法:

  1. ResolveSource 事件处理程序中,我调用了 Engine.SetLocalSource()
  2. 然后调用了 Engine.Detect()

这将重置所有搜索等,并会使用 e.LocalSource 中的更新路径重新启动添加/删除/卸载/修复 session 。现在一切正常。

剩下的是,我不得不努力隐藏 session 的重新启动并从用户选择新组件(或者如果取消选择任何组件)的地方继续屏幕,即我猜 PlantAction(LaunchAction.Install)

我几乎弄清楚了它会被注入(inject)到哪里,只需要再次淹没到代码中(实际上是它的 MVVM :( )

关于wix - 托管 Bootstrap : Failed while prompting for source,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36309118/

相关文章:

c# - 不使用 Visual Studio 创建 Wix Bootstrapper

.net - 为什么 WiX Burn 不重新启动并恢复执行?

Wix 安装程序 : Error 1925 when using silent installer

visual-studio-2010 - WiX 'Bundle' 'ExePackage' 'DetectCondition' 总是假的

c# - Wix 中的自定义操作以操作字符串和设置属性

WIX Burn Bootstrapper 不要求我的 MSI 的管理员权限

WiX .NET Bootstrapper - 功能选择

wix - ExePackage RemotePayload哈希值问题

iis - 如何在卸载时删除 WebApplication?

msbuild - WIX MSBuild 自动化帮助 - 解决方案最佳实践