다음을 통해 공유


State Storage in the Installation Process 

During installation of components, the Installer class (or any class with the RunInstallerAttribute value set to true) writes a file with the extension .InstallState to the deployment computer. For more information, see Installer Tool (Installutil.exe).This file is used to store information about the original state of the system before your resources were installed, and the changes that were made during installation. This file is used in each of the installation component's methods:

  • The Install method accesses a blank copy of this file, and uses it to write information about all of the successful installations it performs.

  • The Commit method receives information from the file in the savedState parameter. You can work with the contents of this file using the IDictionary object if you want to.

  • The Rollback method receives information from the file in the savedState parameter, and uses it to undo previous transactions if an error occurs in the Install method. After rollback completes, the state file is deleted.

  • The Uninstall method receives information from the file in the savedState parameter and uses the file to return the system to its original state.

The .InstallState file is saved on the deployment computer to the same directory in which your project's DLL is installed. You should not modify this file directly, but you can use the IDictionary object to work with its contents.

See Also

Concepts

Introduction to Installation Components