user1687824
user1687824

Reputation: 807

Custom uninstalling clickonce application

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.

Upvotes: 1

Views: 1440

Answers (1)

Stefan Over
Stefan Over

Reputation: 6046

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.

Upvotes: 4

Related Questions