File Operation - 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!

Trax
Posts: 46
Joined: Wed May 06, 2009 5:24 pm

File Operation

I have a few files being copied over during the installation from an outside folder using the Copy File Operation. The problem is that if the file already exists on the Target computer it won’t overwrite it. How do I get the installation to overwrite the files?

P.S. I’m using a sync folder and I have Ensure that all files in this folder overwrite any installed target files.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: File Operation

Hi,

If the file already exists when the file copy operation runs, Windows Installer will use the file versioning rules to determine if the original file will be overwritten or not. Please note that the "Ensure that this file overwrites any installed target file" option does not affect the files which are copied (it affects only files installed by the package).

A solution would be to use a custom action to copy the files and overwrite the existing ones. You can find some sample VBScript code here.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”