Luke
Posts: 22
Joined: Thu Oct 11, 2012 11:00 am

Can't get browsing for folder to work

Hi,

I'm trying to follow the 'How to browse for a folder at install time?' tutorial.

My problem is that when when I click 'Next' on the dialog containing my path edit control all that happens is that the value in the path edit is reset to its original value (i.e. as defined in the custom action) and the dialog remains open.

I believe I have followed all the steps and I have downloaded the example project to check my settings. As far as I can tell they are the same but it seems I have missed something as the example project works correctly.

Any idea what I might have missed that would cause this behaviour?

Thanks,

Luke
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Can't get browsing for folder to work

Hello Luke,

You may encounter the related behavior if you've omitted the step 6 from our "Browse For Folder" article. Can you set the Scheduling Options for the "Set installer property" custom actions to "Execute only once if present in both sequence tables" and see if the behavior still persist?

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Luke
Posts: 22
Joined: Thu Oct 11, 2012 11:00 am

Re: Can't get browsing for folder to work

I checked the scheduling options and they were already set correctly. Any other ideas?

Thanks,

Luke
Luke
Posts: 22
Joined: Thu Oct 11, 2012 11:00 am

Re: Can't get browsing for folder to work

I've worked out what the problem is: I hadn't carried out step 2: 'In the Files and Folders page, create a property-based folder using the property defined above. Add files/folders under this property-based folder.'

What I'm trying to do is allow the user to browse for a folder and then write that location to an INI file. I don't want the installer to copy any files to that folder which is why I missed out the step. If I add a property folder as per the instructions, even without any files in it, then the dialog works as expected.

So to revise my question: can you suggest the best way for me to achieve what I want, which is to:

1) prompt the user for a folder. I'd like the 'browse' facility to be available but it should still be valid for the user to enter a folder (manually) that does not exist.
2) write the path of the selected folder to an INI file
3) I don't want the installer to attempt to access or modify the selected folder in any way

Thanks.
Luke
Posts: 22
Joined: Thu Oct 11, 2012 11:00 am

Re: Can't get browsing for folder to work

(Don't worry, I've worked it out)

Return to “Building Installers”