Wix 安装程序无法删除安装文件夹 [英] Wix installer could not remove installation folder

查看:48
本文介绍了Wix 安装程序无法删除安装文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Wix 安装程序,用于安装(卸载)Windows 服务和另一个 .exe 文件.当我使用此安装程序卸载软件并启用额外日志时,我看到一些关于无法删除我的安装文件夹的错误消息,尽管它确实是空的.日志上出现的第一条信息是这样的:

I have a Wix installer which is designed to install (uninstall) a Windows service and another .exe file. When I uninstall the software using this installer, and enabling extra log, I see some error messages about unable to remove my installation folder, although it is indeed empty. The first message that appears on the log is like this:

调试:错误 2911:无法删除文件夹 MY_INSTALLATION_FOLDER.

DEBUG: Error 2911: Could not remove the folder MY_INSTALLATION_FOLDER.

以下错误都是关于同一个问题.我的第一个猜测当然是卸载过程中使用了一些资源.然而,就像我提到的,这个文件夹中的所有组件确实被删除了,现在这是一个空文件夹.此外,此错误是日志中的第一个错误,这意味着在删除此文件夹之前没有错误.例如,从日志中我可以看到在删除文件夹之前执行了一系列 FileRemove 操作,并且它们都成功了.所以一定是这个文件夹本身正在被使用.但我真的无法弄清楚为什么以及保存此文件夹的内容.顺便说一下,该软件确实被卸载了,因为最终产品删除返回 0,并且与我们的软件相关的所有内容(Windows 服务列表、快捷方式、注册表...)都被删除了,这个空文件夹除外.这并不重要,但无论如何我们绝对不想听到客户询问此类错误(他们正在使用自动安装并且默认情况下启用并检查日志)

The following errors are all about the same problem. My first guess is of course that there are some resources that were being used during the uninstallation. However, like I mentioned, all components in this folder were indeed removed and this is an empty folder by now. Also, this error is the first error in the log, meaning there was no error prior to removing this folder. For example, from the log I can see a series of FileRemove actions were taken right prior to the folder removal and they all succeeded. So it's gotta be that this folder itself was being used. But I really can't figure out why and what is holding this folder. By the way the software was indeed uninstalled since the final product removal returns 0 and every thing related to our software was removed (Windows service list, shortcuts, registries...) excepted this empty folder. It is not crucial but we definitely don't want to hear from our customer asking about this kind of error anyway(they are using auto-installation and the log is by default enabled and checked)

请帮忙.谢谢!

推荐答案

可能的原因:

  • 其他进程正在锁定该文件夹.使用 Unlocker验证是否是这种情况.
  • 某些文件夹的权限受到限制通过 Windows(例如 C:\Windows\system32).通常,您应该避免在 Windows 自己的文件夹下创建文件(除非需要,即:您正在安装设备驱动程序).
  • 您是否正确设置了 文件夹权限?
  • Other process is locking that folder. Use Unlocker to verify if that's the case.
  • Some folders have restricted permissions by Windows (e.g. C:\Windows\system32). Generally, you should avoid creating files under Windows own folders (unless it's required, I.e.: your'e installing a device driver).
  • Did you properly set folder permissions?

这篇关于Wix 安装程序无法删除安装文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆