Announcement

Collapse
No announcement yet.

Overwrite: Ask mode, but only if file to install is older.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Overwrite: Ask mode, but only if file to install is older.

    Hello,

    I search a solution for the installer that it ask the user (if overwrite) but only if the file included in the installer is older that the existing file.

    I try the setting in file properties: Overwrite: Ask the user.
    But the installer always ASK the user if the file already exist. Even if the file to be copied is newer.

    I don't find a solution in the installer to asks (the user) only if the file to be installed is older than the one already present.

    How should I do? Can you help me?

    Thanks.

  • #2
    You will need to write a script for this. If for some reason you need to ask if an older version of a certain file should be kept, then it would make sense making a backup copy of it before installing the current files, and at the end of the setup restore the previous version if the user told that he wanted to keep that file.

    What you want is uncommon, but using SetupData.GetFileList(), you can get a list of the files about to be installed. Compare the existing version on the hard drive if found with the one in the setup, and build a list of the older files would be overwritten when proceeding with the install. You could show this list of files in a dialog of the Before Installing sequence, and ask the user what he wants. Save the backups, install normally, then restore.

    Ulrich

    Comment

    Working...
    X