Export (0) Print
Expand All

EventLogInstaller.Rollback Method

Restores the computer to the state it was in before the installation by rolling back the event log information that the installation procedure wrote to the registry.

[Visual Basic]
Overrides Public Sub Rollback( _
   ByVal savedState As IDictionary _
)
[C#]
public override void Rollback(
 IDictionary savedState
);
[C++]
public: void Rollback(
 IDictionary* savedState
);
[JScript]
public override function Rollback(
   savedState : IDictionary
);

Parameters

savedState
An IDictionary that contains the pre-installation state of the computer.

Remarks

The Rollback method undoes the effects of the Install method. Rollback is called if the installation of any component in the installation project fails. The Install method creates or sets the properties for a event log and event source. Rollback either deletes the event log and source or resets the properties of a pre-existing source to its pre-installation values.

If the installation deleted a previously existing event source and created a new source with the same name, the previous source and its log registration are restored.

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 calls the Rollback method when this or another component in the installation has failed to install, to undo any changes that the installation process has already made.

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 Rollback as the savedState parameter, is continuously updated as the utility rolls back each EventLogInstaller instance. Usually, it is not necessary for your code to explicitly modify this state information.

Requirements

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: 

See Also

EventLogInstaller Class | EventLogInstaller Members | System.Diagnostics Namespace | Install | Uninstall | IDictionary

Show:
© 2014 Microsoft