View Full Version : Prompting overwrite files

07-18-2006, 07:34 PM
:confused: Help please!!! Does anyone know how to make a BASIC MSI to install files and prompt user whenever it is about to overwrite each file regardless of time stamp and version?

Christopher Painter
07-18-2006, 09:24 PM
This is a pattern that is supported by other setup engines, but not MSI ( to my knowledge ). MSI uses the costing process ( which uses versioning rules ) to determine which components need to be upgraded and then the upgrade occurs without further interaction. The design is probably based on the assumption that users aren't smart enough to know when to overwrite or not overwrite a file and that newer versions of the file sould be designed to be backwards compatible with previous versions. Also user interaction isn't possible during silent installations.

You could possibly use a custom action to see if a component to be installed is already installed and then throw up a dialog asking if the files should be overwritten. Then you could could alter the component action state to bypass installation of a file. If your use case also requires `downgrading` a component ( something windows installer won't do by default ) you might want to use the `always overwrite` function of InstallShield to force costing into thinking the file needs to be upgraded.