Starting with Windows Vista, Microsoft provides the Restart Manager API to help software installers to update files that are in use during the installation. The Restart Manager implements functionality to:
Tarma Installer uses this functionality when available to reduce the chance of a system reboot due to in-use files.
Note: Because of the way Tarma Installer updates in-use files, it can typically replace files that are in use by another process even without the help of Restart Manager. This is achieved by renaming the existing file to a different temporary name (which usually succeeds even if the file is currently open in a different process), installing the new file under the desired name, then deleting the original, renamed file. This last step might fail if the original file is in use, but that is usually not a critical problem and is resolved by registering the file for a removal during the next, optional, system restart.
If the target system contains Restart Manager, then Tarma Installer will use it. The detailed interaction between Tarma Installer's Setup.exe program and Windows' Restart Manager takes place as follows.
At this point the installation proper starts. It performs all required actions without reference to Restart Manager.
When the EndProcessing action is reached:
There are additional safeguards that ensure that processes are restarted even if the installation process is terminated prematurely.
The details of the Restart Manager can be found in the Microsoft Windows Platform SDK documentation. Please note that the shut down and restart of processes are subject to the Restart Manager and application implementation details beyond Tarma Installer's control. Some processes cannot be shut down automatically (for example, critical system services) and others cannot be restarted automatically (applications must register themselves through the RegisterApplicationRestart() Windows function to be eligible for automatic restart).