根据情况在卸载期间保存组件
我的任务是根据情况在卸载我们的产品时保存注册表项。 例如,如果用户启用特殊复选框“不要删除我的设置”,则注册表项必须保持打开状态。我知道wix中的组件元素具有特殊属性“永久”,但我的安装程序必须默认在卸载时删除所有已安装的组件。有什么想法吗?在wix中如何做到这一点?或者我必须使用自定义操作? 感谢您抽出时间。
My task is to save registry keys on uninstalling our product depending on condition.
For example, if the user will enable a special checkbox "Don't delete my settings", the registry keys must to stay on. I know that the component element in wix has the special attribute "Permanent", but my installer must to delete all installed components on uninstall by default. Any ideas? How to do this in wix? Or I have to use a custom action?
Thank's for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正确的做法是倒退。
这些注册表项应始终保留在目标计算机上。这可以通过将其组件标记为您提到的“永久”或通过设置 空 GUID 。
之后,在卸载对话框之一上,您可以添加“删除设置”复选框。然后,此复选框可以限制卸载自定义操作,从而删除注册表项。
The correct approach is backwards.
These registry keys should always remain on the target machine. This can be done by marking their components as Permanent as you mentioned or by setting an empty GUID for them.
After that, on one of your uninstall dialogs you can add a "Delete settings" checkbox. This checkbox can then condition an uninstall custom action which deletes the registry entries.
好的,下面的方法怎么样:
Ok, what about the following approach: