Patch fails to update files - Advanced Installer Community
M.Folte
Posts: 3
Joined: Sun Nov 27, 2022 10:04 am

Patch fails to update files

We occasionally have the situation that before we release an "official" patch, we test the changes to individual files directly at the customer's site to see if they are effective (for errors that we cannot reproduce in our test environment).

We do this by renaming the original file installed by the installer (.bak file extension) and then copying the new file. After the test, we delete the new file and restore the original (by simply renaming it).

If we then later try to roll out these changes to the file with a patch created by the AI, the file that was renamed in the meantime will not be updated. The installer does not throw an error message either. It seems as if it simply skips this file.

Does anyone have any idea why this is happening and can help us solve this problem?
Liviu
Posts: 1419
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Patch fails to update files

Hello,

Most likely this is the expected behavior here.

Are your files versioned?

Determining whether to install a file is a complex process. At the highest level, this determination depends on whether the component to which a file belongs is marked for installation. Once determined that a file should be copied, the process is complicated if another file with the same name exists in the target folder. In such situations, making the determination requires a set of rules involving the following properties:

  • Version
  • Date
  • Language
The installer only uses these rules when trying to install a file to a location that already contains a file with the same name. In this case, the Windows Installer uses the rules described in the File Versioning Rules
article, all other things being equal, to determine whether to install.

If your files do not have a version, then this is the normal behavior. The installer will compare the Modified and Create date of your files, and you manually modified these.
Nonversioned Files are User Data—If the Modified date is later than the Create date for the file on the computer, do not install the file because user customizations would be deleted. If the Modified and Create dates are the same, install the file. If the Create date is later than the Modified date, the file is considered unmodified, install the file.

Therefore, can you please test the patch directly without manually modifying the files on the disk and see if it works?

Otherwise, in order for us to further investigate this issue, can you please send us the following resources:

1. the old .AIP (setup project) file
2. the new .AIP (setup project) file
3. an installation log when applying the patch
4. and the Patch project.

by email to support at advancedinstaller dot com?

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”