如果原始安装 DVD 不在驱动器中,则会出现卸载错误

发布于 2024-08-19 11:13:22 字数 835 浏览 3 评论 0原文

当尝试在“添加/删除程序”中删除我们的应用程序时,会弹出以下错误,并且应用程序无法卸载:

错误

“mFileBagIDE.dll”不是有效的短文件名。

奇怪的是,只有当原始安装 DVD 不在驱动器中时,您才会收到此错误。如果 DVD 在驱动器中,则卸载工作正常。

真正的问题是:直到我们的应用程序已经广泛部署之后,我们才发现这个错误,而我们客户的情况是,他们中的许多人可能不再拥有原来的 DVD。这意味着下一个版本的安装程序(进行 Windows 安装程序主要升级)将失败,因为它无法首先删除以前的版本。

所以,我的问题是双重的:

  • 我们做了什么来造成这个问题,以便我们可以在未来的版本中避免它?
  • 有没有办法告诉我们的下一个 Windows 安装程序忽略此错误并继续删除以前的版本?

我们当前的安装程序(导致问题的那个)是使用 InstallAware 生成的。我们可能会转向 WiX。但任何平台上的解决方案(InstallAware、WiX、原始 MSI 表)都值得赞赏!

更新:我的 MSI 中的 InstallExecuteSequenceInstallUISequence 表中都有以下行,这可能非常相关,但我没有了解 SRCDIREX 属性是什么,或者它的设置位置。

| Action        | Condition    |
|---------------|--------------|
| ResolveSource | NOT SRCDIREX |

When trying to remove our application in Add/Remove Programs, the following error pops up, and the application fails to uninstall:

Error

'mFileBagIDE.dll' is not a valid short file name.

The curious thing is that you only get this error if the original installation DVD is not in the drive. If the DVD is in the drive, the uninstall works perfectly.

Here's the real kicker: we did not catch this bug until after our application was already widely deployed, and our clients' situations are such that it is likely many of them no longer have their original DVD. This means that the next version's installer (doing a windows installer major upgrade) will fail because it is unable to first remove the previous version.

So, my question is twofold:

  • What did we do to create this problem so we can avoid it in future releases?
  • Is there a way to tell our next windows installer to ignore this error and go ahead and remove the previous version?

Our current installer (the one that is causing problems) was generated using InstallAware. We're likely moving to WiX. But solutions in any platform (InstallAware, WiX, raw MSI tables) are appreciated!

UPDATE: I have the following row in both the InstallExecuteSequence and InstallUISequence tables in my MSI, which may very well be relevant, but I have no idea what the SRCDIREX property is, or where it is being set.

| Action        | Condition    |
|---------------|--------------|
| ResolveSource | NOT SRCDIREX |

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

唔猫 2024-08-26 11:13:22

引用原始 MSI 的操作(标准或自定义)之一可能不适合仅在安装时运行(例如,ResolveSource 应设置为“未安装”)。您也许可以使用补丁(MSP 文件)来解决此问题,该补丁会更改相关操作的条件。

Probably one of the actions (either standard or custom) that references the original MSI was not conditioned to run on installation only (for example, ResolveSource should be conditioned as "Not INSTALLED"). You might be able to workaround this with a patch (an MSP file) that changes the condition on the relevant action.

对你再特殊 2024-08-26 11:13:22

我首先确定哪个操作导致了错误。我将这样做:

  • 从 DVD 安装您的应用程序,
  • 将 msi 文件复制到某个本地文件夹,比方说“c:\temp”
  • 删除 DVD
  • 开始卸载,如下所示:“msiexec /x yourapp.msi /L*vc:\temp\uninst.log"

当出现错误时,卸载实际上已暂停。然后,您可以检查日志的末尾,以准确了解您在序列中的位置。这应该可以帮助你调试。

如果答案确实是 ResolveSource,则定期修补可能不是一个选择。
希斯·斯图尔特 (Heath Stewart) 在他的博客中提到了这一点 -
http://blogs.msdn.com/ heaths/archive/2007/10/25/resolvesource-requires-source.aspx

“一般情况下,不要安排 ResolveSource。例如,如果在安装补丁时运行,用户将必须插入原始媒体,无论他们是否需要。”

如果这就是您所处的位置,您可以创建一个转换来更新 ResolveSource 操作上的条件,并将其应用到 msi 的缓存副本手动归档。这有点痛苦,但我很确定这会起作用。

I would start by determining which action is causing the error. Here's how I would do that:

  • Install your app from the dvd
  • copy the msi file to some local folder, let's say "c:\temp"
  • Remove the dvd
  • kick off the uninstall like this: "msiexec /x yourapp.msi /L*v c:\temp\uninst.log"

When the error comes up, the uninstall is effectively paused. You can then check the end of the log to see exactly where you are in the sequence. That should help you to debug.

If the answer really is ResolveSource, regular patching may not be an option.
Heath Stewart mentions this in his blog -
http://blogs.msdn.com/heaths/archive/2007/10/25/resolvesource-requires-source.aspx

"In general, do not schedule ResolveSource. If this runs when installing a patch, for example, the user will have to insert the original media whether they would otherwise need to or not."

If that's the position you find yourself in, you could create a transform that updates the condition on your ResolveSource action, and apply that to the cached copy of the msi file manually. It's a bit of a pain, but I'm pretty sure that would work.

天涯沦落人 2024-08-26 11:13:22

您是否尝试将这些文件复制到 %WinDir%/system32 文件夹?

编辑:进行设置以将所有安装 MSI 包复制到磁盘,然后从磁盘驱动器安装它。
删除卸载程序不需要的所有文件。 Adobe、HP 和许多其他公司正在这样做。

have you tried to copy those files to %WinDir%/system32 folder?

EDIT: Make a setup to copy all the setup MSI package to the disk, and install it from the diskdrive.
Remove every files uneeded to uninstaller. Adobe, HP and many other companys are doing that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文