AssemblyInstaller クラスの新しいインスタンスを初期化し、インストールするアセンブリのファイル名と、アセンブリのインストール用に新しい InstallContext オブジェクトを作成するときに使用するコマンド ラインの両方を指定します。
名前空間: System.Configuration.Install
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)
構文
'宣言
Public Sub New ( _
fileName As String, _
commandLine As String() _
)
'使用
Dim fileName As String
Dim commandLine As String()
Dim instance As New AssemblyInstaller(fileName, commandLine)
public AssemblyInstaller (
string fileName,
string[] commandLine
)
public:
AssemblyInstaller (
String^ fileName,
array<String^>^ commandLine
)
public AssemblyInstaller (
String fileName,
String[] commandLine
)
public function AssemblyInstaller (
fileName : String,
commandLine : String[]
)
パラメータ
- fileName
インストールするアセンブリのファイル名。
- commandLine
アセンブリのインストール用に新しい InstallContext オブジェクトを作成するときに使用するコマンド ライン。
使用例
インストールするアセンブリとコマンド ライン引数の配列をパラメータとして指定し、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 のセキュリティ
- 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「」を参照してください。
プラットフォーム
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 2.0、1.1、1.0
参照
関連項目
AssemblyInstaller クラス
AssemblyInstaller メンバ
System.Configuration.Install 名前空間
InstallContext