WIX 在卸载时不会删除文件

发布于 2024-10-01 21:19:32 字数 740 浏览 0 评论 0原文

我正在为我的屏幕保护程序使用 WIX 3.5 制作安装程序。我正在使用 XNA 安装程序模板此处提供 一切正常,除了当我卸载程序时,放置在 WINDOWS/System32 中的 .SCR 文件不会被删除。 我尝试使用该元素来删除它,并且在组件上设置了 Permanent=“no”,但这并不能解决问题。

<Directory Id="WindowsFolder" Name="Windows">
        <Directory Id="WindowsSystem32" Name="System32">
            <Component Id="FileComponent" Guid="cf1cce2d-6812-4443-ba97-299503836b43" Permanent="no">
                <RemoveFile Id="rssFax" Name="ssFax.scr" On="both" />
                <File Id="ssFax" DiskId="1" Vital="yes" Source="../../Content/ssFax.scr" KeyPath="yes" />
            </Component>
        </Directory>
    </Directory>

I'm making an installer with WIX 3.5 for my screensaver. Im using the XNA installer template available here
Everything works, except when I uninstall the program, the .SCR file placed in WINDOWS/System32 is not deleted.
Ive tried using the element to delete it, and I've set Permanent="no" on the component, but that does not fix it.

<Directory Id="WindowsFolder" Name="Windows">
        <Directory Id="WindowsSystem32" Name="System32">
            <Component Id="FileComponent" Guid="cf1cce2d-6812-4443-ba97-299503836b43" Permanent="no">
                <RemoveFile Id="rssFax" Name="ssFax.scr" On="both" />
                <File Id="ssFax" DiskId="1" Vital="yes" Source="../../Content/ssFax.scr" KeyPath="yes" />
            </Component>
        </Directory>
    </Directory>

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

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

发布评论

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

评论(1

半夏半凉 2024-10-08 21:19:32

Windows 安装程序日志文件将在很大程度上解释 MSI 选择不删除此文件的原因。在那之前,这里有一个类似的线程可供阅读:

卸载时 Visual Studio 2008 安装项目不会从系统文件夹中删除文件

A windows installer log file would go a long way in explaining why MSI is choosing not to remove this file. Until then, here's a smiliar thread to read:

Visual Studio 2008 Setup Project not deleting files out of System Folder when uninstalling

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