如何在卸载 MSI 时删除单个注册表值?
我的应用程序有时会在执行期间(即不在安装时)创建一个特定的注册表值。该值位于我不想删除的注册表项中;我只想删除我创建的值。因为它不是在安装时创建的,所以 Windows 安装程序在卸载时不会自动删除它。如果该值存在,我可以在 MSI 中做什么来删除它?
注册表表似乎没有这个选项。这是否意味着我必须编写自定义操作?如果是这样,有人有任何例子吗?
我正在使用 Wise Windows Installer Edition 来创建 MSI。
还发布于此处。
There is a particular registry value that my application sometimes creates during execution, i.e. NOT at installation. This value is within a registry key that I don't want to delete; I just want to delete the value that I created. Because it's not created at install it's not automatically deleted at uninstall by windows installer. What can I do in the MSI to delete this value if it exists?
The Registry table doesn't seem to have this option. Does that mean I have to write a custom action? If so, anyone have any examples?
I'm using Wise Windows Installer Edition to create the MSI.
Also posted here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
抱歉,您需要自定义操作。
Sorry, you will need a custom action.
您确实需要执行自定义操作。
我最终通过放置在 Deferred 部分中的 WriteRegistryValues 之后的自定义操作来实现此操作。
删除密钥的.vbs是这样的:
You do need to do a custom action.
I ended up implementing this with a custom action placed after the WriteRegistryValues within Deferred section.
The .vbs to delete the key is like this: