pdm1999
Posts: 15
Joined: Mon Jan 07, 2013 5:57 pm

Copy file from installation media if it exists

I'm using AI 17.2 and have a Professional install I created with an EXE output. It is a very simple install with no special components or anything, The install works just fine.

However, I now need to be able to optionally provide a unique "customer.dat" file for some customers along with the installer (MyAppInstall.exe). When the customer runs MyAppInstall.exe to install my application, it would see the "customer.dat" file beside it and copy it to a specific location on the target system if that file doesn't already exist there.

What's the simplest way to accomplish that?

Thanks,
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Copy file from installation media if it exists

Hello,

In order to achieve that, you can proceed as it follows:

1. create a search to see if your file already exists. For more information about searches, please have a look over "Search" article.

2. add the "customer.dat" file in the "Files and Folders" page. Right click on the file --> "Go to component" and then condition the installation of the component based on the search.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”