InstallerBeforeInstall Event
 

Occurs before the Install method of each installer in the installer collection has run.

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

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

The following example demonstrates the BeforeInstall event. It is raised by the OnBeforeInstall method.

// MyInstaller is derived from the class 'Installer'.
MyInstaller() : base()
{
   BeforeInstall += new InstallEventHandler(BeforeInstallEventHandler);
}
private void BeforeInstallEventHandler(object sender, InstallEventArgs e)
{
   // Add steps to perform any actions before the install process.
   Console.WriteLine("Code for BeforeInstallEventHandler"); 
}
' MyInstaller is derived from the class 'Installer'.
Sub New()
   MyBase.New()
   AddHandler BeforeInstall, AddressOf BeforeInstallEventHandler
End Sub 'NewNew

Private Sub BeforeInstallEventHandler(sender As Object, e As InstallEventArgs)
   ' Add steps to perform any actions before the install process.
   Console.WriteLine("Code for BeforeInstallEventHandler")
End Sub 'BeforeInstallEventHandler
   // MyInstaller is derived from the class 'Installer'.
private:
   MyInstaller()
   {
      BeforeInstall += gcnew InstallEventHandler( this, &MyInstaller::BeforeInstallEventHandler );
   }

   void BeforeInstallEventHandler( Object^ sender, InstallEventArgs^ e )
   {
      // Add steps to perform any actions before the install process.
      Console::WriteLine( "Code for BeforeInstallEventHandler" );
   }
.NET Framework
Available since 1.1
Return to top