AssemblyInstaller イベント
 パブリック イベント
パブリック イベント| 名前 | 説明 | |
|---|---|---|
| .gif)  | AfterInstall | Installers プロパティ内のすべてのインストーラの Install メソッドが実行された後で発生します。 ( Installer から継承されます。) | 
| .gif)  | AfterRollback | Installers プロパティ内のすべてのインストーラによるインストールがロールバックされた後で発生します。 ( Installer から継承されます。) | 
| .gif)  | AfterUninstall | Installers プロパティ内のすべてのインストーラのアンインストールが実行された後で発生します。 ( Installer から継承されます。) | 
| .gif)  | BeforeInstall | インストーラ コレクション内の各インストーラの Install メソッドが実行される前に発生します。 ( Installer から継承されます。) | 
| .gif)  | BeforeRollback | Installers プロパティ内のインストーラによるインストールがロールバックされる前に発生します。 ( Installer から継承されます。) | 
| .gif)  | BeforeUninstall | Installers プロパティ内のインストーラのアンインストールが実行される前に発生します。 ( Installer から継承されます。) | 
| .gif)  | Committed | Installers プロパティ内のすべてのインストーラがインストールをコミットした後で発生します。 ( Installer から継承されます。) | 
| .gif)  | Committing | Installers プロパティ内のインストーラがインストールをコミットする前に発生します。 ( Installer から継承されます。) | 
| .gif)  | Disposed | コンポーネントの Disposed イベントを待機するイベント ハンドラを追加します。 ( Component から継承されます。) | 
 参照
参照AssemblyInstaller クラス
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)
 構文
構文 使用例
使用例次の例では、AssemblyInstaller コンストラクタの呼び出しによって AssemblyInstaller が作成されます。MyAssembly.exe アセンブリをインストールするために、このオブジェクトのプロパティが設定され、Install メソッドと Commit メソッドが呼び出されます。
Imports System 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 ArgumentException Catch e As Exception Console.WriteLine(e.Message) End Try End Sub 'Main End Class 'AssemblyInstaller_Example
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 (ArgumentException) { } catch (Exception e) { Console.WriteLine( e.Message ); } } }
#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 ( ArgumentException^ ) { } catch ( Exception^ e ) { Console::WriteLine( e->Message ); } }
import System.*; import System.Configuration.Install.*; import System.Collections.*; import System.Collections.Specialized.*; class AssemblyInstallerExample { public static void main(String[] args) { IDictionary mySavedState = new Hashtable(); Console.WriteLine(""); try { // Set the commandline argument array for 'logfile'. String commandLineOptions[] = new String[] { "/LogFile=example.log" }; // Create an object of the 'AssemblyInstaller' class. AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller("MyAssembly.exe", commandLineOptions); myAssemblyInstaller.set_UseNewContext(true); // Install the 'MyAssembly' assembly. myAssemblyInstaller.Install(mySavedState); // Commit the 'MyAssembly' assembly. myAssemblyInstaller.Commit(mySavedState); } catch (ArgumentException exp) { } catch (System.Exception e) { Console.WriteLine(e.get_Message()); } } //main } //AssemblyInstallerExample
 継承階層
継承階層System.MarshalByRefObject
System.ComponentModel.Component
System.Configuration.Install.Installer
System.Configuration.Install.AssemblyInstaller
 スレッド セーフ
スレッド セーフ プラットフォーム
プラットフォームWindows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
 バージョン情報
バージョン情報 参照
参照AssemblyInstaller コンストラクタ ()
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)
 構文
構文 使用例
使用例AssemblyInstaller クラスの AssemblyInstaller コンストラクタ、Install メソッド、および Commit メソッドの例を次に示します。
AssemblyInstaller は、AssemblyInstaller コンストラクタを呼び出すことで作成されます。MyAssembly_Install.exe アセンブリをインストールするために、このオブジェクトのプロパティが設定され、Install メソッドと Commit メソッドが呼び出されます。
Imports System Imports System.Configuration.Install Imports System.Collections Imports System.Collections.Specialized Class MyInstallClass Shared Sub Main() Dim mySavedState = New Hashtable() Console.WriteLine("") Try ' Set the commandline argument array for 'logfile'. Dim myString(0) As String myString(0) = "/logFile=example.log" ' Create an object of the 'AssemblyInstaller' class. Dim myAssemblyInstaller As New AssemblyInstaller() ' Set the properties to install the required assembly. myAssemblyInstaller.Path = "MyAssembly_Install.exe" myAssemblyInstaller.CommandLine = myString myAssemblyInstaller.UseNewContext = True ' Clear the 'IDictionary' object. mySavedState.Clear() ' Install the 'MyAssembly_Install' assembly. myAssemblyInstaller.Install(mySavedState) ' Commit the 'MyAssembly_Install' assembly. myAssemblyInstaller.Commit(mySavedState) Catch End Try End Sub 'Main End Class 'MyInstallClass
using System; using System.Configuration.Install; using System.Collections; using System.Collections.Specialized; class MyInstallClass { static void Main() { IDictionary mySavedState = new Hashtable(); Console.WriteLine( "" ); try { // Set the commandline argument array for 'logfile'. string[] myString = new string[ 1 ]; myString[ 0 ] = "/logFile=example.log"; // Create an object of the 'AssemblyInstaller' class. AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller(); // Set the properties to install the required assembly. myAssemblyInstaller.Path = "MyAssembly_Install.exe"; myAssemblyInstaller.CommandLine = myString; myAssemblyInstaller.UseNewContext = true; // Clear the 'IDictionary' object. mySavedState.Clear(); // Install the 'MyAssembly_Install' assembly. myAssemblyInstaller.Install( mySavedState ); // Commit the 'MyAssembly_Install' assembly. myAssemblyInstaller.Commit( mySavedState ); } catch( Exception ) { } } }
#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; void main() { IDictionary^ mySavedState = gcnew Hashtable; Console::WriteLine( "" ); try { // Set the commandline argument array for 'logfile'. array<String^>^myString = {"/logFile=example.log"}; // Create an Object* of the 'AssemblyInstaller' class. AssemblyInstaller^ myAssemblyInstaller = gcnew AssemblyInstaller; // Set the properties to install the required assembly. myAssemblyInstaller->Path = "MyAssembly_Install.exe"; myAssemblyInstaller->CommandLine = myString; myAssemblyInstaller->UseNewContext = true; // Clear the 'IDictionary' Object*. mySavedState->Clear(); // Install the 'MyAssembly_Install' assembly. myAssemblyInstaller->Install( mySavedState ); // Commit the 'MyAssembly_Install' assembly. myAssemblyInstaller->Commit( mySavedState ); } catch ( Exception^ e ) { Console::WriteLine( e ); } }
import System.*; import System.Configuration.Install.*; import System.Collections.*; import System.Collections.Specialized.*; class MyInstallClass { public static void main(String[] args) { IDictionary mySavedState = new Hashtable(); Console.WriteLine(""); try { // Set the commandline argument array for 'logfile'. String myString[] = new String[1]; myString.set_Item(0, "/logFile=example.log"); // Create an object of the 'AssemblyInstaller' class. AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller(); // Set the properties to install the required assembly. myAssemblyInstaller.set_Path("MyAssembly_Install.exe"); myAssemblyInstaller.set_CommandLine(myString); myAssemblyInstaller.set_UseNewContext(true); // Clear the 'IDictionary' object. mySavedState.Clear(); // Install the 'MyAssembly_Install' assembly. myAssemblyInstaller.Install(mySavedState); // Commit the 'MyAssembly_Install' assembly. myAssemblyInstaller.Commit(mySavedState); } catch (System.Exception exp) { } } //main } //MyInstallClass
 .NET Framework のセキュリティ
.NET Framework のセキュリティ プラットフォーム
プラットフォームWindows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
 バージョン情報
バージョン情報 参照
参照AssemblyInstaller コンストラクタ (String, String[])
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)
 構文
構文Dim fileName As String Dim commandLine As String() Dim instance As New AssemblyInstaller(fileName, commandLine)
 使用例
使用例インストールするアセンブリとコマンド ライン引数の配列をパラメータとして指定し、AssemblyInstaller コンストラクタを呼び出すことで、AssemblyInstaller を作成する例を次に示します。
Dim myStringArray(0) As String Dim myString As String ' Set the commandline argument array for 'logfile'. myStringArray(0) = "/logFile=example.log" ' Set the name of the assembly to install. myString = "MyAssembly_Uninstall.exe" ' Create an object of the 'AssemblyInstaller' class. Dim myAssemblyInstaller As New AssemblyInstaller(myString, myStringArray)
string[] myStringArray = new string[ 1 ]; string myString; // Set the commandline argument array for 'logfile'. myStringArray[ 0 ] = "/logFile=example.log"; // Set the name of the assembly to install. myString = "MyAssembly_Uninstall.exe"; // Create an object of the 'AssemblyInstaller' class. AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller( myString , myStringArray );
array<String^>^myStringArray = {"/logFile=example.log"}; String^ myString = "MyAssembly_Uninstall.exe"; // Create an object of the 'AssemblyInstaller' class. AssemblyInstaller^ myAssemblyInstaller = gcnew AssemblyInstaller( myString,myStringArray );
String myStringArray[] = new String[1]; String myString; // Set the commandline argument array for 'logfile'. myStringArray.set_Item(0, "/logFile=example.log"); // Set the name of the assembly to install. myString = "MyAssembly_Uninstall.exe"; // Create an object of the 'AssemblyInstaller' class. AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller(myString, myStringArray);
 .NET Framework のセキュリティ
.NET Framework のセキュリティ プラットフォーム
プラットフォームWindows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
 バージョン情報
バージョン情報 参照
参照AssemblyInstaller コンストラクタ (Assembly, String[])
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)
 構文
構文Dim assembly As Assembly Dim commandLine As String() Dim instance As New AssemblyInstaller(assembly, commandLine)
 .NET Framework のセキュリティ
.NET Framework のセキュリティ プラットフォーム
プラットフォームWindows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
 バージョン情報
バージョン情報 参照
参照AssemblyInstaller コンストラクタ
 オーバーロードの一覧
オーバーロードの一覧| 名前 | 説明 | 
|---|---|
| AssemblyInstaller () | AssemblyInstaller クラスの新しいインスタンスを初期化します。 | 
| AssemblyInstaller (Assembly, String[]) | AssemblyInstaller クラスの新しいインスタンスを初期化し、インストールするアセンブリと、新しい InstallContext オブジェクトを作成するときに使用するコマンド ラインの両方を指定します。 | 
| AssemblyInstaller (String, String[]) | AssemblyInstaller クラスの新しいインスタンスを初期化し、インストールするアセンブリのファイル名と、アセンブリのインストール用に新しい InstallContext オブジェクトを作成するときに使用するコマンド ラインの両方を指定します。 | 
 参照
参照AssemblyInstaller プロパティ
 パブリック プロパティ
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| .gif)  | Assembly | インストールするアセンブリを取得または設定します。 | 
| .gif)  | CommandLine | アセンブリのインストール用に新しい InstallContext オブジェクトを作成するときに使用するコマンド ラインを取得または設定します。 | 
| .gif)  | Container | Component を格納している IContainer を取得します。 ( Component から継承されます。) | 
| .gif)  | Context | 現在のインストールに関する情報を取得または設定します。 ( Installer から継承されます。) | 
| .gif)  | HelpText | オーバーライドされます。 インストーラ コレクション内のすべてのインストーラに関するヘルプ テキストを取得します。 | 
| .gif)  | Installers | インストーラが格納しているインストーラのコレクションを取得します。 ( Installer から継承されます。) | 
| .gif)  | Parent | インストーラが属しているコレクションを格納しているインストーラを取得または設定します。 ( Installer から継承されます。) | 
| .gif)  | Path | インストールするアセンブリのパスを取得または設定します。 | 
| .gif)  | Site | Component の ISite を取得または設定します。 ( Component から継承されます。) | 
| .gif)  | UseNewContext | アセンブリのインストール用に新しい InstallContext オブジェクトを作成するかどうかを示す値を取得または設定します。 | 
 プロテクト プロパティ
プロテクト プロパティ| 名前 | 説明 | |
|---|---|---|
| .gif)  | CanRaiseEvents | コンポーネントがイベントを発生させることがきるかどうかを示す値を取得します。 ( Component から継承されます。) | 
| .gif)  | DesignMode | Component が現在デザイン モードかどうかを示す値を取得します。 ( Component から継承されます。) | 
| .gif)  | Events | Component に結び付けられているイベント ハンドラのリストを取得します。 ( Component から継承されます。) | 
 参照
参照AssemblyInstaller メソッド
 パブリック メソッド
パブリック メソッド プロテクト メソッド
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| .gif)  | Dispose | オーバーロードされます。 Component によって使用されているリソースを解放します。 ( Component から継承されます。) | 
| .gif)  | Finalize | Component がガベージ コレクションによってクリアされる前に、アンマネージ リソースを解放し、その他のクリーンアップ操作を実行します。 ( Component から継承されます。) | 
| .gif)  | GetService | Component またはその Container で提供されるサービスを表すオブジェクトを返します。 ( Component から継承されます。) | 
| .gif)  | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) | 
| .gif)  | OnAfterInstall | AfterInstall イベントを発生させます。 ( Installer から継承されます。) | 
| .gif)  | OnAfterRollback | AfterRollback イベントを発生させます。 ( Installer から継承されます。) | 
| .gif)  | OnAfterUninstall | AfterUninstall イベントを発生させます。 ( Installer から継承されます。) | 
| .gif)  | OnBeforeInstall | BeforeInstall イベントを発生させます。 ( Installer から継承されます。) | 
| .gif)  | OnBeforeRollback | BeforeRollback イベントを発生させます。 ( Installer から継承されます。) | 
| .gif)  | OnBeforeUninstall | BeforeUninstall イベントを発生させます。 ( Installer から継承されます。) | 
| .gif)  | OnCommitted | Committed イベントを発生させます。 ( Installer から継承されます。) | 
| .gif)  | OnCommitting | Committing イベントを発生させます。 ( Installer から継承されます。) | 
 参照
参照AssemblyInstaller メンバ
アセンブリを読み込み、そのアセンブリ内ですべてのインストーラを実行します。
AssemblyInstaller データ型で公開されるメンバを以下の表に示します。
 パブリック コンストラクタ
パブリック コンストラクタ パブリック プロパティ
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| .gif)  | Assembly | インストールするアセンブリを取得または設定します。 | 
| .gif)  | CommandLine | アセンブリのインストール用に新しい InstallContext オブジェクトを作成するときに使用するコマンド ラインを取得または設定します。 | 
| .gif)  | Container | Component を格納している IContainer を取得します。(Component から継承されます。) | 
| .gif)  | Context | 現在のインストールに関する情報を取得または設定します。(Installer から継承されます。) | 
| .gif)  | HelpText | オーバーライドされます。 インストーラ コレクション内のすべてのインストーラに関するヘルプ テキストを取得します。 | 
| .gif)  | Installers | インストーラが格納しているインストーラのコレクションを取得します。(Installer から継承されます。) | 
| .gif)  | Parent | インストーラが属しているコレクションを格納しているインストーラを取得または設定します。(Installer から継承されます。) | 
| .gif)  | Path | インストールするアセンブリのパスを取得または設定します。 | 
| .gif)  | Site | Component の ISite を取得または設定します。(Component から継承されます。) | 
| .gif)  | UseNewContext | アセンブリのインストール用に新しい InstallContext オブジェクトを作成するかどうかを示す値を取得または設定します。 | 
 プロテクト プロパティ
プロテクト プロパティ| 名前 | 説明 | |
|---|---|---|
| .gif)  | CanRaiseEvents | コンポーネントがイベントを発生させることがきるかどうかを示す値を取得します。(Component から継承されます。) | 
| .gif)  | DesignMode | Component が現在デザイン モードかどうかを示す値を取得します。(Component から継承されます。) | 
| .gif)  | Events | Component に結び付けられているイベント ハンドラのリストを取得します。(Component から継承されます。) | 
 パブリック メソッド
パブリック メソッド プロテクト メソッド
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| .gif)  | Dispose | オーバーロードされます。 Component によって使用されているリソースを解放します。 (Component から継承されます。) | 
| .gif)  | Finalize | Component がガベージ コレクションによってクリアされる前に、アンマネージ リソースを解放し、その他のクリーンアップ操作を実行します。 (Component から継承されます。) | 
| .gif)  | GetService | Component またはその Container で提供されるサービスを表すオブジェクトを返します。 (Component から継承されます。) | 
| .gif)  | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) | 
| .gif)  | OnAfterInstall | AfterInstall イベントを発生させます。 (Installer から継承されます。) | 
| .gif)  | OnAfterRollback | AfterRollback イベントを発生させます。 (Installer から継承されます。) | 
| .gif)  | OnAfterUninstall | AfterUninstall イベントを発生させます。 (Installer から継承されます。) | 
| .gif)  | OnBeforeInstall | BeforeInstall イベントを発生させます。 (Installer から継承されます。) | 
| .gif)  | OnBeforeRollback | BeforeRollback イベントを発生させます。 (Installer から継承されます。) | 
| .gif)  | OnBeforeUninstall | BeforeUninstall イベントを発生させます。 (Installer から継承されます。) | 
| .gif)  | OnCommitted | Committed イベントを発生させます。 (Installer から継承されます。) | 
| .gif)  | OnCommitting | Committing イベントを発生させます。 (Installer から継承されます。) | 
 パブリック イベント
パブリック イベント| 名前 | 説明 | |
|---|---|---|
| .gif)  | AfterInstall | Installers プロパティ内のすべてのインストーラの Install メソッドが実行された後で発生します。(Installer から継承されます。) | 
| .gif)  | AfterRollback | Installers プロパティ内のすべてのインストーラによるインストールがロールバックされた後で発生します。(Installer から継承されます。) | 
| .gif)  | AfterUninstall | Installers プロパティ内のすべてのインストーラのアンインストールが実行された後で発生します。(Installer から継承されます。) | 
| .gif)  | BeforeInstall | インストーラ コレクション内の各インストーラの Install メソッドが実行される前に発生します。(Installer から継承されます。) | 
| .gif)  | BeforeRollback | Installers プロパティ内のインストーラによるインストールがロールバックされる前に発生します。(Installer から継承されます。) | 
| .gif)  | BeforeUninstall | Installers プロパティ内のインストーラのアンインストールが実行される前に発生します。(Installer から継承されます。) | 
| .gif)  | Committed | Installers プロパティ内のすべてのインストーラがインストールをコミットした後で発生します。(Installer から継承されます。) | 
| .gif)  | Committing | Installers プロパティ内のインストーラがインストールをコミットする前に発生します。(Installer から継承されます。) | 
| .gif)  | Disposed | コンポーネントの Disposed イベントを待機するイベント ハンドラを追加します。(Component から継承されます。) | 
 参照
参照- AssemblyInstallerのページへのリンク

 
                             
                    

.gif) 
 .gif) 
 
