卸载时删除文件和文件夹 [英] Remove file and folders on uninstall
问题描述
我正在学习 WIX 来为我的应用程序构建安装程序,但我一直在删除文件.我的问题是如何在卸载时删除文件和文件夹.当我点击删除按钮时,安装程序创建的所有文件和文件夹都不会在卸载时删除.
I am learning WIX to build installer for my app but I am stuck with removing files. My question is how can I remove files and folders on uninstall. When I click on remove button, all the files and folders which the installer created doesn't remove on uninstall.
推荐答案
答案在上面的评论中,但为了将来参考,当文件未被删除时,首先要检查两件事:
The answer is in the comments above but for future reference there are two things to check first when files are not being removed:
确保您没有 Component/@Guid="".具体设置为空字符串 (Guid="") 告诉 Windows 安装程序忽略该组件中内置的所有内容.注意:WiX v3.6+ 可以完全保留 Component 元素的 Guid 属性,这很好(会生成一个稳定的 GUID).
Ensure that you do not have Component/@Guid="". In Specifically setting to an empty string (Guid="") tells the Windows Installer ignore all the stuff built into this Component. Note: WiX v3.6+ you can leave the Guid attribute of the Component element completely and that is fine (a stable GUID will be generated).
确保您没有 Component/@Permanent="yes".显然,这告诉 Windows 安装程序不要卸载这些东西.
Ensure the you do not have Component/@Permanent="yes". Obviously, that tells the Windows Installer to not uninstall the stuff.
这篇关于卸载时删除文件和文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!