Preserving a file based on the last modification date - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

daryl_san
Posts: 1
Joined: Mon May 06, 2013 9:50 am

Preserving a file based on the last modification date

Hi.. Just want to ask for your suggestions on how to do this:

During installation, I want to check the version/last modification date of a file location in my APPDIR folder. I would then use it as a condition whether the file should be overwritten or not.

For example, I've already installed my program and it includes a web.config file. Before I update the program, I want to check if the already installed web.config file on the machine has been recently modified, and if it is not, then I would overwrite the file with the one on the installer.


Any ideas would be gladly appreciated. Thanks! :)
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Preserving a file based on the last modification date

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm afraid we don't have predefined support for this. In order to achieve this you can create your own custom action which will check for the version/last modification date of the related file and set an installer property (e.g. MY_PROP) accordingly. Then you can use the above property to condition, from "Organization" page, the installation of the related file component. Also, if the related file is added in "Files and Folders" page as a regular file, then you can use the MY_PROP property in the "Condition" field from "Edit File -> Operation tab -> Do not overwrite existing file" section.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”