Is there a way to FORCE a file to be installed regardless of the file date/file version of an existing file? In InstallShield Professional 6.x you could set the 'Overwrite' property to 'Always' and a given file was overwritten regardless of file date or version.
How can I do the same in InstallShield 7.0.4?
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Is there a method to FORCE a file to be installed?
Started by
MNJon
, Dec 12 2002 18:19
3 replies to this topic
Posted 26 September 2003 - 05:10
Not that I know of. The whole file versioning logic in windows installer is designed to prevent the "DLL hell" that can result by doing "force overwrite" of shared files (which was quite commonly done before windows installer came along). Hence windows installer will always refuse to overwrite files with higher version numbers, won't delete non-versioned files where the create and modified dates differ, etc... (look up the file overwrite rules in the SDK).
You could set REINSTALLMODE="amus" instead of "omus" in your installer. This should reinstall all files in your installation regardless of version.
I have also sometimes added a custom action at the beginning of the setup that deletes the file you want to replace / downgrade. This is not a recommended solution however.
If you right click a non-dynamically linked file in a component, and select properties, there are also some options to "override system settings" (version, language etc...). With some hacking here you might be able to replace files - however I would strongly advise against this kind of approach - it really is a hack.
You could set REINSTALLMODE="amus" instead of "omus" in your installer. This should reinstall all files in your installation regardless of version.
I have also sometimes added a custom action at the beginning of the setup that deletes the file you want to replace / downgrade. This is not a recommended solution however.
If you right click a non-dynamically linked file in a component, and select properties, there are also some options to "override system settings" (version, language etc...). With some hacking here you might be able to replace files - however I would strongly advise against this kind of approach - it really is a hack.
Regards
-Stein Åsmul
-Stein Åsmul
Posted 30 September 2003 - 02:29
There is also another trick that you can use.
Windows installer will use the FileVersion that is added into the msi File table. So you can trick the installer by say adding in an executable of version 4.0, but actually saying that it is version 10.0 inside the msi file.
Then you can can make all of your other files be a companion of this file.
Try a few test installs and see how that goes.
Windows installer will use the FileVersion that is added into the msi File table. So you can trick the installer by say adding in an executable of version 4.0, but actually saying that it is version 10.0 inside the msi file.
Then you can can make all of your other files be a companion of this file.
Try a few test installs and see how that goes.
Posted 02 October 2003 - 23:27
One more note about REINSTALLMODE. You could do a "Set Property" custom action that sets the REINSTALLMODE to "amus" if the setup is a major upgrade of the existing installation. To accomplish this insert the custom action early in the execute sequence and give it a condition of "IS_MAJOR_UPGRADE". As far as I know this should ensure that all files are reinstalled regardless of version.
Regards
-Stein Åsmul
-Stein Åsmul