How is the need for self-repair determined by the Windows Installer??
By design of Windows Installer Technology, a file will self-repair when the keypath is missing from Component and replace the file on the machine. When an advertised entry point such as an advertised shortcut is accessed, Windows Installer looks at the keypaths of each component to determine if a component should be repaired. If the keypath is missing, Windows Installer will self-repair. If no keypath is explicitly specified, Windows Installer considers the component's directory as the keypath. If that directory does not exist, a repair occurs.
The Windows Installer does not look for individual files to determine if self-repair is necessary, but looks only at the keypath of each component to determine if a self-repair is necessary.
To see if a component has a keypath, view the component details from the Components tab of the Setup Editor. Right click on the component containing your file, select Details, and see what the keypath is under File, Reg or ODBC Key Path which is based on the Key Path Type. If the keypath is pointing to a file or key that is on the machine, no repair will be initiated. If it says none, the Windows Installer will use the directory listed in the Directory field of the Component Details as a keypath.If you are overwriting one.exe with a newer version of one.exe, self-repair will not trigger, because the file is still there and it does not look at file versioning. If one.exe becomes corrupt, it will only repair if you manually repair it or if another component in that feature triggers the repair.
Imported Document Id