AssemblyInstaller クラス

定義

アセンブリを読み込み、そのアセンブリ内ですべてのインストーラーを実行します。

public ref class AssemblyInstaller : System::Configuration::Install::Installer
public class AssemblyInstaller : System.Configuration.Install.Installer
type AssemblyInstaller = class
    inherit Installer
Public Class AssemblyInstaller
Inherits Installer
継承

次の例では、 コンストラクターを AssemblyInstaller 呼び出すことによって が AssemblyInstaller 作成されます。 このオブジェクトのプロパティが設定され、 Install メソッドと Commit メソッドが呼び出されてアセンブリが MyAssembly.exe インストールされます。

#using <System.dll>
#using <System.Configuration.Install.dll>

using namespace System;
using namespace System::Configuration::Install;
using namespace System::Collections;
using namespace System::Collections::Specialized;
int main()
{
   IDictionary^ mySavedState = gcnew Hashtable;
   Console::WriteLine( "" );
   try
   {
      
      // Set the commandline argument array for 'logfile'.
      array<String^>^commandLineOptions = {"/LogFile=example.log"};
      
      // Create an object of the 'AssemblyInstaller' class.
      AssemblyInstaller^ myAssemblyInstaller = gcnew AssemblyInstaller(
         "MyAssembly.exe", commandLineOptions );
      myAssemblyInstaller->UseNewContext = true;
      
      // Install the 'MyAssembly' assembly.
      myAssemblyInstaller->Install( mySavedState );
      
      // Commit the 'MyAssembly' assembly.
      myAssemblyInstaller->Commit( mySavedState );
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( e->Message );
   }
}
using System;
using System.Configuration.Install;
using System.Collections;
using System.Collections.Specialized;

class AssemblyInstaller_Example
{
   static void Main()
   {
      IDictionary mySavedState = new Hashtable();

      Console.WriteLine( "" );

      try
      {
         // Set the commandline argument array for 'logfile'.
         string[] commandLineOptions = new string[ 1 ] {"/LogFile=example.log"};

         // Create an object of the 'AssemblyInstaller' class.
         AssemblyInstaller myAssemblyInstaller = new
                     AssemblyInstaller( "MyAssembly.exe" , commandLineOptions );

         myAssemblyInstaller.UseNewContext = true;

         // Install the 'MyAssembly' assembly.
         myAssemblyInstaller.Install( mySavedState );

         // Commit the 'MyAssembly' assembly.
         myAssemblyInstaller.Commit( mySavedState );
      }
      catch (Exception e)
      {
         Console.WriteLine( e.Message );
      }
   }
}
Imports System.Configuration.Install
Imports System.Collections
Imports System.Collections.Specialized

Class AssemblyInstaller_Example

   Shared Sub Main()
      Dim mySavedState = New Hashtable()

      Console.WriteLine("")

      Try
         ' Set the commandline argument array for 'logfile'.
         Dim commandLineOptions(0) As String
         commandLineOptions(0) = "/LogFile=example.log"

         ' Create an object of the 'AssemblyInstaller' class.
         Dim myAssemblyInstaller As _
               New AssemblyInstaller("MyAssembly.exe", commandLineOptions)

         myAssemblyInstaller.UseNewContext = True

         ' Install the 'MyAssembly' assembly.
         myAssemblyInstaller.Install(mySavedState)

         ' Commit the 'MyAssembly' assembly.
         myAssemblyInstaller.Commit(mySavedState)
      Catch e As Exception
         Console.WriteLine(e.Message)
      End Try
   End Sub
End Class

コンストラクター

AssemblyInstaller()

AssemblyInstaller クラスの新しいインスタンスを初期化します。

AssemblyInstaller(Assembly, String[])

AssemblyInstaller クラスの新しいインスタンスを初期化し、インストールするアセンブリと、新しい InstallContext オブジェクトを作成するときに使用するコマンド ラインの両方を指定します。

AssemblyInstaller(String, String[])

AssemblyInstaller クラスの新しいインスタンスを初期化し、インストールするアセンブリのファイル名と、アセンブリのインストール用に新しい InstallContext オブジェクトを作成するときに使用するコマンド ラインの両方を指定します。

プロパティ

Assembly

インストールするアセンブリを取得または設定します。

CanRaiseEvents

コンポーネントがイベントを発生させることがきるかどうかを示す値を取得します。

(継承元 Component)
CommandLine

アセンブリのインストール用に新しい InstallContext オブジェクトを作成するときに使用するコマンド ラインを取得または設定します。

Container

IContainer を含む Component を取得します。

(継承元 Component)
Context

現在のインストールに関する情報を取得または設定します。

(継承元 Installer)
DesignMode

Component が現在デザイン モードかどうかを示す値を取得します。

(継承元 Component)
Events

Component に結び付けられているイベント ハンドラーのリストを取得します。

(継承元 Component)
HelpText

インストーラー コレクション内のすべてのインストーラーに関するヘルプ テキストを取得します。

Installers

インストーラーが格納しているインストーラーのコレクションを取得します。

(継承元 Installer)
Parent

インストーラーが属しているコレクションを格納しているインストーラーを取得または設定します。

(継承元 Installer)
Path

インストールするアセンブリのパスを取得または設定します。

Site

ComponentISite を取得または設定します。

(継承元 Component)
UseNewContext

アセンブリのインストール用に新しい InstallContext オブジェクトを作成するかどうかを示す値を取得または設定します。

メソッド

CheckIfInstallable(String)

指定したアセンブリをインストールできるかどうかを確認します。

Commit(IDictionary)

インストール トランザクションを完了します。

CreateObjRef(Type)

リモート オブジェクトとの通信に使用するプロキシの生成に必要な情報をすべて格納しているオブジェクトを作成します。

(継承元 MarshalByRefObject)
Dispose()

Component によって使用されているすべてのリソースを解放します。

(継承元 Component)
Dispose(Boolean)

Component によって使用されているアンマネージド リソースを解放し、オプションでマネージド リソースも解放します。

(継承元 Component)
Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetLifetimeService()
古い.

対象のインスタンスの有効期間ポリシーを制御する、現在の有効期間サービス オブジェクトを取得します。

(継承元 MarshalByRefObject)
GetService(Type)

Component またはその Container で提供されるサービスを表すオブジェクトを返します。

(継承元 Component)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
InitializeLifetimeService()
古い.

このインスタンスの有効期間ポリシーを制御する有効期間サービス オブジェクトを取得します。

(継承元 MarshalByRefObject)
Install(IDictionary)

インストールを実行します。

MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
MemberwiseClone(Boolean)

現在の MarshalByRefObject オブジェクトの簡易コピーを作成します。

(継承元 MarshalByRefObject)
OnAfterInstall(IDictionary)

AfterInstall イベントを発生させます。

(継承元 Installer)
OnAfterRollback(IDictionary)

AfterRollback イベントを発生させます。

(継承元 Installer)
OnAfterUninstall(IDictionary)

AfterUninstall イベントを発生させます。

(継承元 Installer)
OnBeforeInstall(IDictionary)

BeforeInstall イベントを発生させます。

(継承元 Installer)
OnBeforeRollback(IDictionary)

BeforeRollback イベントを発生させます。

(継承元 Installer)
OnBeforeUninstall(IDictionary)

BeforeUninstall イベントを発生させます。

(継承元 Installer)
OnCommitted(IDictionary)

Committed イベントを発生させます。

(継承元 Installer)
OnCommitting(IDictionary)

Committing イベントを発生させます。

(継承元 Installer)
Rollback(IDictionary)

コンピューターをインストール前の状態に復元します。

ToString()

Component の名前 (存在する場合) を格納する String を返します。 このメソッドはオーバーライドできません。

(継承元 Component)
Uninstall(IDictionary)

インストールした内容を削除します。

イベント

AfterInstall

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

(継承元 Installer)
AfterRollback

Installers プロパティ内のすべてのインストーラーによるインストールがロールバックされた後で発生します。

(継承元 Installer)
AfterUninstall

Installers プロパティ内のすべてのインストーラーのアンインストールが実行された後で発生します。

(継承元 Installer)
BeforeInstall

インストーラー コレクション内の各インストーラーの Install(IDictionary) メソッドが実行される前に発生します。

(継承元 Installer)
BeforeRollback

Installers プロパティ内のインストーラーがロールバックされる前に発生します。

(継承元 Installer)
BeforeUninstall

Installers プロパティ内のインストーラーのアンインストールが実行される前に発生します。

(継承元 Installer)
Committed

Installers プロパティ内のすべてのインストーラーがインストールをコミットした後で発生します。

(継承元 Installer)
Committing

Installers プロパティ内のインストーラーがインストールをコミットする前に発生します。

(継承元 Installer)
Disposed

Dispose() メソッドの呼び出しによってコンポーネントが破棄されるときに発生します。

(継承元 Component)

適用対象