How can I create an uninstall link in start menu for a ClickOnce application How can I create an uninstall link in start menu for a ClickOnce application wpf wpf

How can I create an uninstall link in start menu for a ClickOnce application


ClickOnce won't add this shortcut for you. ClickOnce will create a shortcut to launch your app and a shortcut to your help url, that's it. If you want that shortcut created, you'll have to do it yourself in your app's code.

Basically, all you need to do is look in the registry at...HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\[Your app's key]\UninstallString

Creating a shortcut out of that value (rundll32.exe dfshim.dll...) will accomplish what you want. However, as PetPaulson pointed out in the comments, this shortcut won't be removed by the ClickOnce uninstall. It will remain in their start menu; not good.

That said, I personally don't think it's worth the effort. I really dislike apps that create all sorts of shortcuts (start menu, desktop, uninstall, etc) for me. Most people know how to use Add/Remove Programs. Just my personal preference, though.


Microsoft discourages this in its directives. Uninstallers should be accessible primarily from the "Add/Remove programs" dialog.