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);


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)


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 コンストラクタ ()
アセンブリ: 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


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からAssemblyInstaller コンストラクタを検索する場合は、下記のリンクをクリックしてください。

- AssemblyInstaller コンストラクタのページへのリンク