Performs the installation and writes event log information to the registry.
[Visual Basic] Overrides Public Sub Install( _ ByVal stateSaver As IDictionary _ ) [C#] public override void Install( IDictionary stateSaver ); [C++] public: void Install( IDictionary* stateSaver ); [JScript] public override function Install( stateSaver : IDictionary );
- An IDictionary used to save information needed to perform a rollback or uninstall operation.
|PlatformNotSupportedException||The platform the installer is trying to use is not Windows NT 4.0 or later.|
The Install method writes event log information to the registry, and associates the event log with a log that is specified by the Log property. If the log does not already exist (and a source is specified), Install creates a log and associates the new source with it.
Typically, you do not call the methods of the EventLogInstaller from within your code; they are generally called only by the InstallUtil.exe installation utility. The utility automatically calls the Install method during the installation process to write registry information that is associated with the event log being installed. Installation is transactional, so if there is a failure of any installation project component during the installation, all the previously-installed components are rolled back to their pre-installation states. This is accomplished by calling each component's Rollback method.
An application's install routine uses the project installer's Installer.Context property to automatically maintain information about the components that have already been installed. This state information, which is passed to Install as the stateSaver parameter, is continuously updated as the utility installs each EventLogInstaller instance. Usually, it is not necessary for your code to explicitly modify this state information.
Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code