Installer.AfterInstall 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在 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