简体   繁体   English

C#自定义卸载程序

[英]c# custom uninstaller

I'm attempting to write a custom uninstaller script; 我正在尝试编写自定义卸载程序脚本; however, I'm stuck at the "programs, and features" dialog. 但是,我仍然停留在“程序和功能”对话框中。 Are there any written documentation as to what registry keys do I need to add in order for my application to be displayed there? 是否需要任何书面文件说明我需要添加哪些注册表项才能在其中显示我的应用程序? Or -alternatively- are there any native WINAPI / .NET functions to create a shurtcut there directly? 或者-或者-是否有任何本机WINAPI / .NET函数可以直接在其中创建shurtcut?

Addendum: there are business requirements disallowing me the use of third-party tools, such as the default MSI installer. 附录:某些业务要求不允许我使用第三方工具,例如默认的MSI安装程序。 Provided answer should work on a clean XP virtual machine, w/ .NET 2.0 installed, without referencing to any external .dlls. 提供的答案应该在干净的XP虚拟机(安装了.NET 2.0)上起作用,而无需引用任何外部.dll。 Thank you. 谢谢。

I would imagine MSI installer is the best solution, but if you must, the registry key which is the source of items in add/remove programs dialog is here: 我可以想象MSI安装程序是最好的解决方案,但是如果您必须的话,注册表项是添加/删除程序对话框中项目的来源:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

I don't know if there's a good documentation about structure of this key, but I'm sure you can figure it out, it's not so hard 我不知道是否有关于此密钥结构的好的文档,但是我敢肯定您可以弄清楚,这并不难

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM