InstallerAfterUninstall Event
 

Occurs after all the installers in the property perform their uninstallation operations.

Namespace:   System.Configuration.Install
Assembly:  System.Configuration.Install (in System.Configuration.Install.dll)

public event InstallEventHandler AfterUninstall
public:
event InstallEventHandler^ AfterUninstall {
	void add(InstallEventHandler^ value);
	void remove(InstallEventHandler^ value);
}
member AfterUninstall : IEvent<InstallEventHandler,
    InstallEventArgs>
Public Event AfterUninstall As InstallEventHandler

The following example demonstrates the AfterUninstall event. It is raised by the OnAfterUninstall method.

// 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 'NewNew

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 'AfterUninstallEventHandler
   // 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" );
   }
.NET Framework
Available since 1.1
Return to top