PDA

View Full Version : Deleting Files before installing new ones


EdDressel
06-26-2002, 09:22 AM
We distribute data files that are used for calculations (such as tax information). The user does not edit these. We install over any existing files.

I need to be sure that all the data files are deleted before installing the new files.

For example, I want to delete all [InstallDir]\Data\Tax*.* are deleted before installing any tax*.* files.

How can I achieve this? I can create a custom action, but is there another route? If not, how can I choose where the custom action gets executed?

IS 3.53 SP4

Thanks
Ed Dressel

Chandima
07-12-2002, 01:00 PM
By default if these files are added by your setup they should be removed during an uninstall (provided you haven't set the file's "Permanent" property). To be on the safe side though you can write a Custom Action that launches during the uninstall sequence to clean it up. To do this, create the custom action and then change it's "Execute" property to "During Uninstall". The change it's "Invoke" property to what you like. I would suggest setting to "Before System Changes" because this way the action will get launched even if the product is uninstalled using the "Remove" button on Win2K.