次の方法で共有


Installer.AfterInstall イベント

定義

Installers プロパティ内のすべてのインストーラーの Install(IDictionary) メソッドが実行された後で発生します。

public:
 event System::Configuration::Install::InstallEventHandler ^ AfterInstall;
public event System.Configuration.Install.InstallEventHandler AfterInstall;
member this.AfterInstall : System.Configuration.Install.InstallEventHandler 
Public Custom Event AfterInstall As InstallEventHandler 

イベントの種類

AfterInstallイベントの例を次に示します。 メソッドによって発生します OnAfterInstall

   // MyInstaller is derived from the class 'Installer'.
public:
   MyInstaller()
   {
      AfterInstall += gcnew InstallEventHandler( this, &MyInstaller::AfterInstallEventHandler );
   }

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

Private Sub AfterInstallEventHandler(ByVal sender As Object, _
                                    ByVal e As InstallEventArgs)
   ' Add steps to perform any actions after the install process.
   Console.WriteLine("Code for AfterInstallEventHandler")
End Sub

適用対象

こちらもご覧ください