How to copy custom file upon installation - 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!

Zubenator
Posts: 13
Joined: Mon Oct 05, 2009 7:45 am

How to copy custom file upon installation

Hi all
I need to perform a copy of my custom file which is placed besides setup.exe, to installation dir. This file must not be a part of package, so it could be configurable, but setup.exe should copy it to the installation directory. Could it be done using Advanced Installer features?

Thank you
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to copy custom file upon installation

Hello,

You can use a file copy operation to copy your file to the target directory.
Note that the location of your executable installer is held by the [SETUPEXEDIR] property, so the path to your file should look like:

Code: Select all

[SETUPEXEDIR]yourfilename.ext
Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Zubenator
Posts: 13
Joined: Mon Oct 05, 2009 7:45 am

Re: How to copy custom file upon installation

Thank you Gabriel, I still have issues with this operation
1. I added a property-based folder (for this I had to add a custom property and bind its value to [SETUPEXEDIR])
2. Then I added a copy file operation, which takes a file from this folder as a source and copies it to destination dir
3. but when I build the package and run it, it displays a message "Could not access network location <path>", where path is actually a folder where my setup.exe is placed and then it interrupts the installation

is there something wrong that I done?
Thank you
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How to copy custom file upon installation

Hi,

Please note that this how-to explains the correct approach (in your case the property is SETUPEXEDIR). If you followed these steps and the problem persists, please send us the .AIP (project file) you are using and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zubenator
Posts: 13
Joined: Mon Oct 05, 2009 7:45 am

Re: How to copy custom file upon installation

Thank you, Gabriel, it works now. But I have a question: will this file overwrite an existing file with the same name in case of performing an upgrade installation? Can it be configurable?

Return to “Common Problems”