dawies
Posts: 40
Joined: Thu Jun 23, 2011 7:03 am

Browse for a folder with files to include in installation

Hi there,

I am building an installer that has an advanced option. When using advanced option I want the user to be able to pick a folder containing files that will be copied in to the install directory. I do not want the user to pick the individual files just the folder.

How do I make a folder dialog that returns a selected folder?

I have looked at this http://www.advancedinstaller.com/user-g ... le-project but do not kno how to make the folder dialog to return a folder and not a file.

regards,

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

Re: Browse for a folder with files to include in installatio

Hi Dawie,

Our user guide contains the Browse for folder how-to which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dawies
Posts: 40
Joined: Thu Jun 23, 2011 7:03 am

Re: Browse for a folder with files to include in installatio

Hi there Cosmin,

I keep getting an error that says "The argument of the CheckPath control event on dialog myFolderDialog is invalid."

Any ideas?

regards,

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

Re: Browse for a folder with files to include in installatio

Hi Dawie,

Can you please send us the .AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dawies
Posts: 40
Joined: Thu Jun 23, 2011 7:03 am

Re: Browse for a folder with files to include in installatio

Thank you Cosmin,

The problem was that I put [] around the property in (SetTargetPath) of the next button. But now I get "The directory entry 'CUST_CONFIG_PATH' does no exist in the Directory table.

What I want to accomplish for 6+ installers is this:

When the user ticks Advanced Install, it should set the property "AdvancedConfig" and show the custom folder dialog. Here the user should pick a folder that contains various .config files. The installer should now delete any .config files in the APPDIR and then copy the file (name specified in custom action) to the APPDIR.

I've spend almost to days on this and still no joy. I would be thrilled if you could assist me. Attached is the .aip for one of the projects.

kind regards,

Dawie
Attachments
SuperSign Client.aip
(33.67 KiB) Downloaded 738 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Browse for a folder with files to include in installatio

Hi Dawie,

In case you need to browse for a file and copy it to the application folder, here is an article with sample project to help you with the steps.

To remove the file from the application folder, simply add a file removal for it and condition it using the property that stores the path of the browsed file. In case of the sample project that property is called THE_LICENSE. This way the file will be removed only when the user browses for an external file.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dawies
Posts: 40
Joined: Thu Jun 23, 2011 7:03 am

Re: Browse for a folder with files to include in installatio

Hi Mihai,

I do not want the user to browse for the file but for the folder containing the file. (Since there will be a whole bunch of .config files and I do not want the user to be able to pick the wrong one.)

regards,

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

Re: Browse for a folder with files to include in installatio

Hi Dawie,

In this case you can follow the article my colleague Cosmin posted above and then read the article I previously posted( also download the sample ) to replace the file in the Application Folder.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dawies
Posts: 40
Joined: Thu Jun 23, 2011 7:03 am

Re: Browse for a folder with files to include in installatio

I read both articles thank you.

After reading both articles and trying to build the project I posted my question :)

This is where I'm stuck at the moment:

"The directory entry 'CUST_CONFIG_PATH' does no exist in the Directory table.

regards,

Dawie
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Browse for a folder with files to include in installatio

Hi Dawie,

This error appears only if you don't have the property-based folder defined in Files and Folders page, of course using the property "'CUST_CONFIG_PATH".

Just go to Files and Folders page, select "New -> Property based", then select the property ""CUST_CONFIG_PATH".

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”