Page 1 of 1

Browse for folder doesn't display current directory

Posted: Thu Jun 04, 2009 7:34 pm
by drewau
Hi,

When I view the destination folder form in my project, I cannot work out how to get the Browse For Folder dialog to default to the current destination folder.
I can understand it defaulting to My Documents if the destination path doesn't exist, but I'm using one that does.
Is there a way to do this?
If there is, is there also a way to do it for multiple destination paths on the same form? (not just using Targetdir)

I'm using IA 9 Studio (Build Moya.052409)

Thanks in advance,

Drew.

Posted: Sun Jun 14, 2009 11:56 pm
by drewau
I need an answer to this please.

Is there a way to display the current folder in the browse control?

Posted: Mon Jun 15, 2009 2:50 am
by StyX
I've been unable to solve the problem of the browse button myself.

A way that I've been using for getting two different directories from the user and writing to them is the PTShellTree control located under the Browser tab.

Then I've simply added the Install Files line for thoose two paths straight into the MSIcode view.

Hopefully this helps you a little at least :)

Posted: Mon Jun 15, 2009 3:50 pm
by MichaelNesmith
I've attached a pre-built dialog that shows how to do this.

1. Bind your edit controls to a variable.
2. Make sure the edit controls are set to receive the written variable value.
3. Set the browse button names to the variable names for the edit controls.
4. Make sure the browse buttons are performing the choose custom folder action.
5. Ensure that the variables are defined in MSIcode before calling Display Dialog.

File Attached:

custom paths.zip

Posted: Mon Jun 15, 2009 5:35 pm
by drewau
Thanks Styx and Michael for taking the time the assist me :-)

I'll take a look at the sample you have provided.