Installer.BeforeUninstall Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs before the installers in the Installers property perform their uninstall operations.
public:
event System::Configuration::Install::InstallEventHandler ^ BeforeUninstall;
public event System.Configuration.Install.InstallEventHandler BeforeUninstall;
member this.BeforeUninstall : System.Configuration.Install.InstallEventHandler
Public Custom Event BeforeUninstall As InstallEventHandler
Event Type
Examples
The following example demonstrates the BeforeUninstall event. It is raised by the OnBeforeUninstall method.
// MyInstaller is derived from the class 'Installer'.
private:
MyInstaller()
{
BeforeUninstall += gcnew InstallEventHandler( this, &MyInstaller::BeforeUninstallEventHandler );
}
void BeforeUninstallEventHandler( Object^ sender, InstallEventArgs^ e )
{
// Add steps to perform any actions before the Uninstall process.
Console::WriteLine( "Code for BeforeUninstallEventHandler" );
}
// MyInstaller is derived from the class 'Installer'.
MyInstaller() : base()
{
BeforeUninstall += new InstallEventHandler(BeforeUninstallEventHandler);
}
private void BeforeUninstallEventHandler(object sender, InstallEventArgs e)
{
// Add steps to perform any actions before the Uninstall process.
Console.WriteLine("Code for BeforeUninstallEventHandler");
}
' MyInstaller is derived from the class 'Installer'.
Sub New()
MyBase.New()
AddHandler BeforeUninstall, AddressOf BeforeUninstallEventHandler
End Sub
Private Sub BeforeUninstallEventHandler(sender As Object, e As InstallEventArgs)
' Add steps to perform any actions before the Uninstall process.
Console.WriteLine("Code for BeforeUninstallEventHandler")
End Sub
Applies to
See also
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.