This documentation is archived and is not being maintained.

ServiceProcessInstaller.Rollback Method

Rolls back service application information written to the registry by the installation procedure. This method is meant to be used by installation tools, which process the appropriate methods automatically.

Namespace: System.ServiceProcess
Assembly: System.ServiceProcess (in system.serviceprocess.dll)

public override void Rollback (
	IDictionary savedState
)
public void Rollback (
	IDictionary savedState
)
public override function Rollback (
	savedState : IDictionary
)

Parameters

savedState

An IDictionary that contains the context information associated with the installation.

Exception typeCondition

ArgumentException

The savedState is a null reference (Nothing in Visual Basic).

-or-

The savedState is corrupted or non-existent.

Normally, you do not call the methods on ServiceProcessInstaller within your code; they are generally called only by the install utility. The install utility automatically calls the ServiceProcessInstaller.Install method during the installation process. It backs out failures, if necessary, by calling Rollback on the object that generated the exception.

An application's install routine maintains information automatically about the components already installed, using the project installer's Installer.Context. This state information, passed into Rollback as the savedState parameter, is continuously updated as the ServiceProcessInstaller instance and each ServiceInstaller instance is installed by the utility. It is usually unnecessary for your code to modify this state information explicitly.

Rollback passes to the calling method any exceptions thrown by base class methods or BeforeInstall / AfterInstall event handlers.

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: