简体   繁体   中英

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?

Addendum: there are business requirements disallowing me the use of third-party tools, such as the default MSI installer. Provided answer should work on a clean XP virtual machine, w/ .NET 2.0 installed, without referencing to any external .dlls. 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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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