Performs the installation.
[Visual Basic] Overridable Public Sub Install( _ ByVal stateSaver As IDictionary _ ) [C#] public virtual void Install( IDictionary stateSaver ); [C++] public: virtual void Install( IDictionary* stateSaver ); [JScript] public function Install( stateSaver : IDictionary );
Exception Type | Condition |
---|---|
ArgumentException | stateSaver is a null reference (in Visual Basic Nothing) |
Exception | An exception occurred in the OnBeforeInstall event-handling method.
-or- An exception occurred in the OnAfterInstall event-handling method. |
This method does the bulk of the work for the installation. It calls the Install methods of the Installer objects contained in the InstallerCollection of this instance. stateSaver is updated to reflect the status of the installation after the contained installers have been run. If all of the Install methods succeed, the Commit method of this instance will be called. Otherwise (that is, if it throws an exception), the Rollback method of this instance will be called.
Notes to Callers: The stateSaver IDictionary should be empty when passed to Install.
Notes to Inheritors: If you override the Install method in a derived class, be sure to call the base class's Install method.
Installer Class | Installer Members | System.Configuration.Install Namespace | Commit | Uninstall | Rollback | InstallerCollection | Installers