Question

Presently when i uninstall a .net clickonce app, it doesn't check whether the App is in the running state. Also it doesn't delete files on PC restart also.

So I am planning to overwrite the uninstall method to handle this situation.

Which is the class and method gets called on uninstall? Inplacehostingmanager class has only install related functions.

Was it helpful?

Solution

You cannot implement the functionality for uninstall actions in your main application. You need to overwrite the registry entries, written by the setup, to run a custom executable. This will then check if your application is still running and remove the files that you might have stored in a custom application folder. Then you call the real ClickOnce uninstall routine and you're done.

A very good tutorial can be found on www.codeproject.com.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top