Files missing after an upgrade with AdvancedInstaller MSI
When using Advanced Installer to perform an install all files are correctly installed however when performing an upgrade certain files are removed
The installer is configured in the following way
"Install new version first then uninstall the old versions"
When looking at the log files you see that the files are being removed as part of the RemoveFiles command within the MSI
Action 18:01:55: RemoveFiles. Removing files
RemoveFiles: File: filename, Directory: Path
Normal Cause
Typically this can be caused by trying to install a file with an older version - Windows installer decides that due to the version number being older than what's currently installed the file is not installed and then during the uninstall phase the file (as it hasn't been updated) is removed.The "Ensure that all files in this folder overwrite any installed target files" normally resolves this issue
Alternatitve Cause
Another cause of this problem is due to the GUIDs of the files being installed. If you update some DLLs by deleted them from AdvancedInstaller in the Files and Folders view and then add them again they will be created with a new GUID (even if the installation path is the same).Windows Installer installs the new version of the file (with the new GUID) and then proceeds to remove unneeded files in the Uninstall phase.
It sees that the file with the new GUID has been updated and the file remains.
It then sees that the file with the old GUID was not updated and therefore can be removed. Unfortunately it doesn't realise that the same file has already been updated under another GUID and the file is removed.
Performing a repair on the MSI correctly places the files back as expected
Resolution
- Open a backup copy of the previous .aip file
- Browse to the Organisation section and find the file that you have updated
- Copy the GUID of the component
- Open the corresponding file in the updated .aip file and replace the new GUID with the previous GUID that was copied from the working .aip file
Comments
Post a Comment