When building a Setup project, it is important to know how Windows Installer will operate when it installs your application. The installation process goes through three phases. First, any required information is collected from the userthis includes details such as the directory in which the application will be installed. Second, the necessary steps are performed to install the application, which includes file copying, adding registry entries, and performing any other necessary system configuration. Finally, the user is informed that the installation process is complete.
This relatively straightforward process is complicated by two requirements. First, applications must be uninstallableusers must be able to go into the Add/Remove Programs section of the Control Panel and remove a program. The Windows Logo requirements demand that all of the components that an application installs must be removed. Second, if the installation process fails halfway through, the installer is required to back out any changes it made, leaving the machine in the state it was before the installation was started.
Fortunately, Windows Installer handles uninstallation and rollback for all standard installation operations. If you add custom installation code, you must provide support for backing out changes, but for normal installation steps such as file copying, component registration, and registry editing, everything is done for you.