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!

Harrr
Posts: 6
Joined: Wed Nov 12, 2014 1:12 pm

Exection order of file-operations

Hello All,

In our installation project, we've defined several file-operations under 'Recources, FIle and FOlders' in a folder. The order of execution of the file-operations are of importance.
How do I set/see the order of execution of these file-operations?

Thank you in advance(d) for your replies,
Harrr
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Exection order of file-operations

Hi Harrr and welcome to Advanced Installer forums.

The execution order of the file operations is as follows and I'm afraid that it cannot be modified:
  • 1. File Removal
    2. File Copy/Move
    3. File Duplication
If you want a custom order for these operations, you can create one or more custom actions that perform these operations in the desired order.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Harrr
Posts: 6
Joined: Wed Nov 12, 2014 1:12 pm

Re: Exection order of file-operations

Thank you for your reply!

Just 1 more, what happens (order of execution) when I've multiple FileCopy operations?

Thanks again,
harrr
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Exection order of file-operations

Hi Harrr,

The order of multiple operations of the same type cannot be set. There are many details about this in the Microsoft's documentation, but most likely they will be executed randomly by Windows Installer.

Can you explain to us your scenario, so we can try to find a solution?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Harrr
Posts: 6
Joined: Wed Nov 12, 2014 1:12 pm

Re: Exection order of file-operations

Hello Eusebiu,

Thank you again for your response.

The scenario is that we want to copy a (configuration-)file (e.g. config.xml) from existing previous version(s) in the order from oldest to newest, ensuring that the on of the latest version is used.
copy \Version1.0\config.xml to \NewVersion\config.xml
copy \Version1.1\config.xml to \NewVersion\config.xml
copy \Version1.2\config.xml to \NewVersion\config.xml

Executing the file=copy in this order would cause the config.xml of version1.2 to be the one used in the new version.

Hope this clarifies the scenario,
Regards,
Harrr.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Exection order of file-operations

Hi Harrr,

I suppose that your application can be installed side by side (more versions installed on a machine at the same time). In this case I can think of two solutions:
  • 1. place the configuration file in a common folder where all the version of the application can access and use it

    2. create a "Product Version (identify by Upgrade Code)" extended search, extract the newest installed version from this search, then create a custom action that copy the configuration file from that version. You can simply create a BAT file as described in the How to uninstall an existing application thread to copy that file
Indeed, using the "File Copy Operation" the order of these operations cannot be set and you may not be able to achieve what you want.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”