Browse for folder doesn't display current directory

Got a problem you cannot solve? Try here.
Post Reply
drewau
Posts: 27
Joined: Tue Aug 05, 2008 10:29 pm
Location: Australia

Browse for folder doesn't display current directory

Post 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.
drewau
Posts: 27
Joined: Tue Aug 05, 2008 10:29 pm
Location: Australia

Post by drewau »

I need an answer to this please.

Is there a way to display the current folder in the browse control?
StyX
Posts: 51
Joined: Fri Apr 11, 2008 7:14 am
Location: Stavanger, Norway
Contact:

Post 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 :)
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
drewau
Posts: 27
Joined: Tue Aug 05, 2008 10:29 pm
Location: Australia

Post by drewau »

Thanks Styx and Michael for taking the time the assist me :-)

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