Only install a subset of files if a file is newer
Posted: Wed Oct 29, 2014 9:26 pm
Hi,
I have a bunch of files common to a few installers. One the files is a DLL, which contains a version number, but the other file do not.
What I would like to do is test if the DLL is currently installed and if so test if the DLL file is newer/older than the one about to be installed. If the existing DLL is older, go ahead and install all the new files, otherwise don't install any of them.
I've thought of "Get File Version" and "Check File Version", but the files need to already be present on the system. However, in this case, one is still residing somewhere within the installation package, so I can't get that file's version.
I thought that I could install the file to a temp folder and then use the above, then delete it, but of course the "Install Files" action is not immediate, so the above still fails as the file isn't there yet.
I've used InstallShield in the past and within that I can query the MSI File Table to get the file version. Can such a thing be done with IA?
Can I somehow get the version of the DLL injected in to the MSIcode at build time, i.e. have the build system get the file version and call the IA builder with MYDLL=1.2.3.4?
Any other suggestions?
Amo
I have a bunch of files common to a few installers. One the files is a DLL, which contains a version number, but the other file do not.
What I would like to do is test if the DLL is currently installed and if so test if the DLL file is newer/older than the one about to be installed. If the existing DLL is older, go ahead and install all the new files, otherwise don't install any of them.
I've thought of "Get File Version" and "Check File Version", but the files need to already be present on the system. However, in this case, one is still residing somewhere within the installation package, so I can't get that file's version.
I thought that I could install the file to a temp folder and then use the above, then delete it, but of course the "Install Files" action is not immediate, so the above still fails as the file isn't there yet.
I've used InstallShield in the past and within that I can query the MSI File Table to get the file version. Can such a thing be done with IA?
Can I somehow get the version of the DLL injected in to the MSIcode at build time, i.e. have the build system get the file version and call the IA builder with MYDLL=1.2.3.4?
Any other suggestions?
Amo