AssemblyInstaller.CommandLine 屬性

定義

取得或設定當為組件的安裝建立新 InstallContext 物件時要使用的命令列。Gets or sets the command line to use when creating a new InstallContext object for the assembly's installation.

public:
 property cli::array <System::String ^> ^ CommandLine { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
public string[] CommandLine { get; set; }
member this.CommandLine : string[] with get, set
Public Property CommandLine As String()

屬性值

String[]

String 型別的陣列,表示當為組件的安裝建立新 InstallContext 物件時要使用的命令列。An array of type String that represents the command line to use when creating a new InstallContext object for the assembly's installation.

範例

在下列範例中, CommandLine的屬性AssemblyInstaller會設定為記錄檔名稱。In the following example, the CommandLine property of an AssemblyInstaller is set to the logfile name.

// Set the logfile name in the commandline argument array.
array<String^>^commandLineOptions = {"/LogFile=example.log"};
myAssemblyInstaller->CommandLine = commandLineOptions;

// Set the logfile name in the commandline argument array.
string[] commandLineOptions = new string[ 1 ] {"/LogFile=example.log"};
myAssemblyInstaller.CommandLine = commandLineOptions;
' Set the logfile name in the commandline argument array.
Dim commandLineOptions(0) As String
commandLineOptions(0) = "/LogFile=example.log"
myAssemblyInstaller.CommandLine = commandLineOptions

適用於

另請參閱