Installer.BeforeInstall 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 Install(IDictionary) method of each installer in the installer collection has run.
public:
event System::Configuration::Install::InstallEventHandler ^ BeforeInstall;
public event System.Configuration.Install.InstallEventHandler BeforeInstall;
member this.BeforeInstall : System.Configuration.Install.InstallEventHandler
Public Custom Event BeforeInstall As InstallEventHandler
Event Type
Examples
The following example demonstrates the BeforeInstall event. It is raised by the OnBeforeInstall method.
// 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" );
}
// 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
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
Applies to
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.