WIX 删除文件夹问题

发布于 2024-08-15 00:42:16 字数 415 浏览 0 评论 0原文

我正在尝试向我的基于 msi 的安装程序(用 wix 编写)添加一项功能,该功能将允许用户更改在 Windows 开始菜单中保存快捷方式的文件夹的名称。

到目前为止,我所做的是在那里添加一个文件夹(使用静态名称),添加该文件夹的快捷方式,并在卸载过程中删除所有文件夹(通过使用RemoveFolder标签)。然后我添加了一个自定义操作,它将获取从 UI 中的编辑框设置的属性并将其设置为文件夹的名称,如下所示:

通过在 InstallExecuteSequence 中运行此命令,可以正确创建文件夹(使用用户为其设置的名称)并且所有内容都已设置到位。但是,当我卸载该产品时,该文件夹中仍保留有所有快捷方式(现在不指向任何内容,当您单击它们时它们会要求删除)。

有没有办法删除我在安装过程中动态更改其名称属性的文件夹,如上所述?

谢谢。

I am trying to add a feature to my msi based installer, written in wix, which will allow the user to change the name of the folder that keeps the shortcuts within the Windows start menu.

What I did so far is to add a folder there (with a static name), add shortcuts to that folder and remove all of them during uninstall (by using the RemoveFolder tag). Then I added a custom action that will pick up the property that is set from an edit box in UI and set that as the name of the folder, something like:

By running this within the InstallExecuteSequence, the folder is created correctly (with the name the user set for it) and all things are set into place. However, when I uninstall the product, the folder remains with all of it's shortcuts in it (that point to nothing now and they ask for deletion when you click them).

Is there any way to remove a folder that I dynamically changed it's Name attribute during installation, as described above?

Thanks.

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

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

发布评论

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

评论(1

嗳卜坏 2024-08-22 00:42:16

您需要将动态属性保存到注册表,并在维护/修复/卸载期间将其读回。 Windows Installer 不会“记住”属性更改,您需要自己执行此操作。

You'll need to save the dynamic property to the registry, and read it back during maintenance/repair/uninstall. Windows Installer doesn't "remember" property changes, you need to do it yourself.

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