Copy file if present otherwise install - 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!

timbritton
Posts: 4
Joined: Wed Apr 23, 2008 1:47 am

Copy file if present otherwise install

Hi,

I need to be move a file from different folder if it exists, otherwise install it from the installer. How can I test for the presence of a file and move/copy if it exists and skip the installer from the install package. If it doesn't exist, then install the file from the package.

Thanks,

Tim Britton
Connective OSN
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Re: Copy file if present otherwise install

Hi Tim,

To test the presence of a file on the target computer you can use a File search ("Search" page). The result (the file path) is stored by default in the RESULT_PROPERTY property.

Now to copy a file from different location if the search succeed you can use a "New File Operation->File Copy/Move" in "Files and Folders" page. The execution of this file operation is conditioned by the install state of the selected "Component". I suggest to use a dummy component (registry key/value for example) and condition it with the search result.

If you have any questions please let us know.

Best Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”