AssemblyInstaller.CommandLine 屬性

定義

取得或設定當為組件的安裝建立新 InstallContext 物件時要使用的命令列。

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 物件時要使用的命令列。

範例

在下列範例中 CommandLine ,的 AssemblyInstaller 屬性會設定為logfile名稱。

// 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

適用於

另請參閱