Is there any way to access the list of files packed in the installer? I would like to iterate over this list. For each file, all I need is the name of the file and its target location.
Better still, can this be done for specific components and/or folders via their name attributes?
The reason I'd like to be able to do this is that in my update installer, a subset of the files have modified file names (because some filenames contain the version information). For these, I would like to be able to handle the removal of older versions without necessarily needing to know the exact names.
For example, if I'm installing
I'd like to clean up other instances of
If such enumeration of the packed files is not possible, is there an alternative approach I should consider? (I do not wish to have to run the uninstaller.)
Likewise, are there mechanisms for getting the name of any existing uninstaller and/or iterating over the files referenced in the uninstaller?
Alternatively, is there a mechanism for supplying a wildcarded name for replacing files?
For updates, there is an
It there a way to express something like this:
or better still, some sort of regex-based replacement rule:
asked 20 Jan '12, 05:33
It is not possible to check packed files at runtime. Regarding cleaning old files, an possible solution would be to organize the files to upgrade into component and include there the cleaning:
Also, adding checking for a version in the
Another approach you could follow is to write a file with the current installed version and also store the current packed version in a variable. Then at runtime, if the packed version is greater, delete all the files, and if not, deselect the component.
answered 23 Jan '12, 09:59