User Selects files to be copied onto Server - 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!

Matt
Posts: 109
Joined: Tue Oct 19, 2010 4:54 pm

User Selects files to be copied onto Server

Hi,

As Part of the install we need the user to select some files such as dll or config files which are customer specific and move them to a certain directory. The Directory has been created in the Files and Folders section. I am planning on Setting a Browse button in the UI to allow the user to find the files they want but then how do I copy the files to the Correct Directory?

Matt
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: User Selects files to be copied onto Server

Hi Matt,

Here is the user guide article to help you with this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Matt
Posts: 109
Joined: Tue Oct 19, 2010 4:54 pm

Re: User Selects files to be copied onto Server

Hi,

The Files we want to copy accross to the folders we define in advanced installer are customer config files and report files. They can be copied accross at anytime during the isntall. We used to do this manualy at the end of an install but now we are using advanced installer we would like to do this as automated as possible so we would like the user to browse to a file that has all of their specific reports in and then advanced install copied them files into the folder we have created in the files and folders structure.

Matt
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: User Selects files to be copied onto Server

Hi Matt,

You can start with the how-to mentioned by Mihai. To copy multiple files based on a single selected file you will need a custom action. This custom action can use the path stored in AI_OFN_FILEPATH property (the one set by our browse for file custom action) to copy the files.

Basically, your custom action code should get the selected file parent path, generate the file paths for the files you want to copy and perform the copy or move operations.

Depending on your custom action type (EXE or DLL), it can receive the installation path (APPDIR property) and selected file path (AI_OFN_FILEPATH property) as parameters or access the installer properties directly.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Matt
Posts: 109
Joined: Tue Oct 19, 2010 4:54 pm

Re: User Selects files to be copied onto Server

Hi,

Thanks for your help. I will look at doing what you suggested If I have any problems I will let you know.

Matt

Return to “Common Problems”