I was asked a question recently by a reader that I hadn’t been asked before. His company had an installation that among other things, created an INI file on the target system during the initial installation. His task was to write an upgrade installation, and he needed to determine during the upgrade if the INI file had been modified by the user since the initial installation. He asked my opinion on how to do this.
Windows Installer-based projects such as Basic MSI and InstallScript MSI have an INI File Changes view where you can create new INI files, and also modify existing files. But, this is not what he needed to do.
If he were using a Basic MSI project, he could create an InstallScript Custom Action or a Managed Code Custom Action that would compare the user’s INI file to the original INI file. He could then return whether the file had been modified or not.
If he were using an InstallScript MSI or InstallScript project, he could just write an InstallScript function that would perform this task. He informed me that his installation was a pure InstallScript installation.
I gave him his options. He then decided to include a copy of the original INI in the Support Files view of the upgrade installation and then compare it to the user’s INI file on their system.
I thought I would pass this along.