Initializes a new instance of the InstallContext class and creates a log file for the installation.
[Visual Basic] Overloads Public Sub New( _ ByVal logFilePath As String, _ ByVal commandLine() As String _ ) [C#] public InstallContext( string logFilePath, string[] commandLine ); [C++] public: InstallContext( String* logFilePath, String* commandLine[] ); [JScript] public function InstallContext( logFilePath : String, commandLine : String[] );
This constructor creates a log file over the specified path, and parses the array of command line parameters into the Parameters property. If a log file path is specified in the command line parameters, "/logfile= somepath", this path is used to create the file. If the logfile argument is not specified in the command line, the default path for the installation, as specified by the logFilePath parameter, is used. If a command line argument of "/logfile= " is passed, no logfile is created; do this to suppress creation of a log file.
Notes to Callers: Pass your default log file path in the logFilePath parameter when you call this constructor. This is the path over which the log file will be created, unless the/logfile command line argument is usedwhen the installation executable is run.
InstallContext Class | InstallContext Members | System.Configuration.Install Namespace | InstallContext Constructor Overload List | Parameters | LogMessage