See Also: InstallContext Members
Typically, an System.Configuration.Install.InstallContext is created by an installation executable, such as InstallUtil.exe, that installs assemblies. The installation program invokes the System.Configuration.Install.InstallContext constructor, passing it the default log-file path and command-line parameters.
Prior to calling its Installer.Install(IDictionary), Installer.Commit(IDictionary), Installer.Rollback(IDictionary), or Installer.Uninstall(IDictionary) methods, the installation program sets the Installer.Context property of an System.Configuration.Install.Installer to the instance of System.Configuration.Install.InstallContext. Before calling these methods, an System.Configuration.Install.Installer that contains an installer collection in the Installer.Installers property sets the Installer.Context property of each contained installer.
The InstallContext.Parameters property contains a parsed version of the command line that is entered to run the installation executable. The property contains information such as the path to a log file, whether to display log information on the console, and whether to show a user interface during the installation. Call the InstallContext.IsParameterTrue(string) method to find out whether a command-line parameter is true.
Use the InstallContext.LogMessage(string) method to write status messages to the installation log file and the console.