Installer.AfterUninstall 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在 Installers 属性中所有安装程序都执行它们的卸载操作后发生。
public:
event System::Configuration::Install::InstallEventHandler ^ AfterUninstall;
public event System.Configuration.Install.InstallEventHandler AfterUninstall;
member this.AfterUninstall : System.Configuration.Install.InstallEventHandler
Public Custom Event AfterUninstall As InstallEventHandler
事件类型
示例
以下示例演示 了 事件 AfterUninstall 。 它由 OnAfterUninstall 方法引发。
// MyInstaller is derived from the class 'Installer'.
private:
MyInstaller()
{
AfterUninstall += gcnew InstallEventHandler( this, &MyInstaller::AfterUninstallEventHandler );
}
void AfterUninstallEventHandler( Object^ sender, InstallEventArgs^ e )
{
// Add steps to perform any actions before the Uninstall process.
Console::WriteLine( "Code for AfterUninstallEventHandler" );
}
// MyInstaller is derived from the class 'Installer'.
MyInstaller() : base()
{
AfterUninstall += new InstallEventHandler(AfterUninstallEventHandler);
}
private void AfterUninstallEventHandler(object sender, InstallEventArgs e)
{
// Add steps to perform any actions before the Uninstall process.
Console.WriteLine("Code for AfterUninstallEventHandler");
}
' MyInstaller is derived from the class 'Installer'.
Sub New()
MyBase.New()
AddHandler AfterUninstall, AddressOf AfterUninstallEventHandler
End Sub
Private Sub AfterUninstallEventHandler(sender As Object, e As InstallEventArgs)
' Add steps to perform any actions before the Uninstall process.
Console.WriteLine("Code for AfterUninstallEventHandler")
End Sub