应用程序卸载事件 [英] Application uninstall event

查看:85
本文介绍了应用程序卸载事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序卸载之前执行一些检查。

我该怎么办?

是否有像Application_Uninstall这样的事件。

我正在使用C#3.5 windows应用程序。



请帮助。

谢谢。

解决方案

如果您使用的是VS setup and Deployment,则可以使用OnBeforeUninstall编写自定义代码。在调用自定义代码之前,请调用base.OnBeforeUninstall(savedState),以便已注册的委托接收事件,从而允许在卸载之前执行自定义代码。



希望它帮助

I want to perform some checking before my application gets uninstall.
How can i do it?
Is there any event like Application_Uninstall.
I am working on C#3.5 windows application.

Please help.
Thanks.

解决方案

In case if you are using VS setup & Deployment, you can use OnBeforeUninstall to write your custom code. Before calling your custom code, call the base.OnBeforeUninstall(savedState) so that registered delegates receive the event thereby allowing your custom code to execute before the uninstall.

Hope it helps.


这篇关于应用程序卸载事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆