Installer.Rollback Method
Assembly: System.Configuration.Install (in system.configuration.install.dll)
| Exception type | Condition |
|---|---|
| The savedState parameter is a null reference (Nothing in Visual Basic). -or- The saved-state IDictionary might have been corrupted. | |
| An exception occurred during the Rollback phase of the installation. This exception is ignored and the rollback continues. However, the computer might not be fully reverted to its initial state after the rollback completes. |
The following example demonstrates the Rollback method of Installer. The Rollback method is overridden in the derived class of Installer. An exception is generated to force an installation rollback.
// Override 'Rollback' method of Installer class. public override void Rollback( IDictionary mySavedState ) { base.Rollback( mySavedState ); Console.WriteLine( "The Rollback method of 'MyInstallerSample'" + " has been called" ); }
// Override 'Rollback' method of Installer class.
public void Rollback(IDictionary mySavedState)
{
super.Rollback(mySavedState);
Console.WriteLine("The Rollback method of 'MyInstallerSample'"
+ " has been called");
} //Rollback
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.