Page 1 of 1

Updating existing files with renamed ones

Posted: Mon Nov 06, 2006 12:37 pm
by schumann
I've been using Wise and it allows me to give a file in the installation a different name to the identical file on my system. This is useful to me because, if a user is upgrading an existing version, I can install a file with a different name from their existing copy and then extract data from it (when they run the program proper) to update their existing file.

This lets me use the same package for both new versions and upgrades.

This doesn't seem to be possible with InstallAware (it's rejected my renamed files in the converted script). Is that right? What alternative approach would you suggest that doesn't require me to maintain the same file with different names on my development system?

Posted: Mon Nov 06, 2006 1:10 pm
by CandiceJones
Many potential ways to address this, really:

a) Directly copy the file using CopyFileA in kernel32.dll from $SUPPORTDIR$ after adding it as a support file to your project
b) Create a new folder for the file if it already exists in the same folder - you cannot rename the target file at runtime with Windows Installer, but you certainly can change its destination folder

Hopefully those ideas get you started...