How can I let the user select multiple destination folders?
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
How can I let the user select multiple destination folders?
Is it possible to prompt the user for multiple destination folders? I just bought IA7 Studio and I'm redoing a project that was originally done in Wise WFWI. I have three features, one is for an ASP.NET application, the other two install some Win32 executables.
I would like to be able set the destination folder for each feature. In addition, I would also like to be able to let the user specify the name for the virtual directory.
For the "Create IIS Virtual Folder" action, can I use a variable for the Virtual Path? Can I use a variable for the physical path?
thanks,
Chris Miller
VersaTrans Solutions, Inc
I would like to be able set the destination folder for each feature. In addition, I would also like to be able to let the user specify the name for the virtual directory.
For the "Create IIS Virtual Folder" action, can I use a variable for the Virtual Path? Can I use a variable for the physical path?
thanks,
Chris Miller
VersaTrans Solutions, Inc
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
Yes it is possible. Here is how you would do it:Is it possible to prompt the user for multiple destination folders?
1.- Give a name to the button you want to use, let's say you name it DIR
2.- Change the action of the button to "Select Custom Folder"
3.- On the textbox you want to link to DIR button select "[Written Variable Values]" in the "Receives Information" field.
4.- In the "Writes Values to Variable" field enter DIR
Attached is a zip file with images showing what I just explained you.
Yes, you can. You can use variables in both fields.For the "Create IIS Virtual Folder" action, can I use a variable for the Virtual Path? Can I use a variable for the physical path?
File Attached:
steps1-4.zip
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
Will that work with the TPTShellTree control? I have the "Vista Black" theme installed and I made a copy of the destination dialog (as destinationweb). I added an edit field for the virtual directory name and set
The second edit control has the following properties
This dialog uses a TPTShellTree control and I set it's properties to
How can I use the TPTShellTree control to work with the same results as your example?
- "Receives Information" to "[Written Variable Value]"
"Writes Values to Variable" to "WEBVIRTDIRNAME"
The second edit control has the following properties
- "Receives Information" to "[Written Variable Value]"
"Writes Values to Variable" to "WEBVIRTDIR"
This dialog uses a TPTShellTree control and I set it's properties to
- "Receives Information" to "[Written Variable Value]"
"Writes Values to Variable" to "WEBVIRTDIR"
How can I use the TPTShellTree control to work with the same results as your example?
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
Thanks, I thought that was the case. How can I make it behave with a custom dir variable (that does not yet exist) in the same it does with the installdir?
In that case, the edit field displays "c:\\program files\\myapp" and the PTShellTree control displays "c:\\program files".
For the virtual directory I would like the edit control to display the equivalent of c:\\inetpub\\wwwroot\\myapp" and the PTShellTree control to display "c:\\inetpub\\wwwroot".
In that case, the edit field displays "c:\\program files\\myapp" and the PTShellTree control displays "c:\\program files".
For the virtual directory I would like the edit control to display the equivalent of c:\\inetpub\\wwwroot\\myapp" and the PTShellTree control to display "c:\\inetpub\\wwwroot".
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
I did not find a way to do it in the same dialog. However, a workaround would be to set a temp variable to the value of $TARGETDIR$ after the destination dialog, and in another dialog, use the PTShellTree and Edit controls as they were for $TARGETDIR$. After the second dialog, set your WEBVIRTDIR variable to $TARGETDIR$ and TARGETDIR to the first temp variable. That will work for your case. I Hope I explained it clear enough.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
Thanks! That was very clear. I think a couple of additional steps will be needed on order to handle navigating back to previous dialogs, but it soungs pretty straight forward. I think I would need to set temp variable to $TARGETDIR$ before the label for the first destination dialog, then set $TARGETDIR$ to the value of the temp variable after the label. That way, navigating back to the destination dialog from the web destination dialog would properly set $TARGETDIR$ to the correct value.
Thank you again for your prompt response. I've accomplished more in 1 week with InstallAware than I have with 2 years with Wise For Windows Installer.
Thank you again for your prompt response. I've accomplished more in 1 week with InstallAware than I have with 2 years with Wise For Windows Installer.
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
I tried that sequence of steps and it still displayed the desktop folder instead of the values that I wanted.
Just before the Display Dialog code, I have the line
Set Variable TARGETDIR to $WEBVIRTDIR$
Where $WEBVIRTDIR$ has been been previously initialized to $WWWROOTDIR$\\myapp.
If I comment out the Set Variable line, the controls display the contents of TARGETDIR, a folder that does not yet exist.
I took a look at the runtime values of the variables and TARGETDIR displays as an actual drive letter ("c:\\program files\\my company"), while $WWWROOTDIR$ is set to %SystemDrive%\\inetpub\\webroot".
If I hard-code TARGETDIR to path like c:\\inetpub\\webroot\\foo, then I get the proper values in the edit controls. It looks like the TPTShellTree control has a problem with environment variables. How can I replace %SystemDrive% with the actual drive letter?
Just before the Display Dialog code, I have the line
Set Variable TARGETDIR to $WEBVIRTDIR$
Where $WEBVIRTDIR$ has been been previously initialized to $WWWROOTDIR$\\myapp.
If I comment out the Set Variable line, the controls display the contents of TARGETDIR, a folder that does not yet exist.
I took a look at the runtime values of the variables and TARGETDIR displays as an actual drive letter ("c:\\program files\\my company"), while $WWWROOTDIR$ is set to %SystemDrive%\\inetpub\\webroot".
If I hard-code TARGETDIR to path like c:\\inetpub\\webroot\\foo, then I get the proper values in the edit controls. It looks like the TPTShellTree control has a problem with environment variables. How can I replace %SystemDrive% with the actual drive letter?
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
Chris,
Environment variables are dereference in the following way in IA:
#Env_Var#, i.e. for %SystemDrive% use instead #SystemDrive#
Attached is a simple project showing you the steps I gave you work. Take a look at the MSICode. I changed the following lines:
73-74
158-177
Environment variables are dereference in the following way in IA:
#Env_Var#, i.e. for %SystemDrive% use instead #SystemDrive#
Attached is a simple project showing you the steps I gave you work. Take a look at the MSICode. I changed the following lines:
73-74
158-177
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
I'm sorry, but I can't find any attachments with your last message. But I thin k I understand what needs to be done. I just do a
Replace %SystemDrive% with #SystemDrive# in variable WEBVIRTDIR
On a related not: I am getting the value "c:\\inetpub\\wwwroot\\" (with t4railing backslash) for the value of $WWWROOT$. Is that the way it's supposed to work? The other folders (like $PROGRAMFILES$" do not have the trailing backslash
Replace %SystemDrive% with #SystemDrive# in variable WEBVIRTDIR
On a related not: I am getting the value "c:\\inetpub\\wwwroot\\" (with t4railing backslash) for the value of $WWWROOT$. Is that the way it's supposed to work? The other folders (like $PROGRAMFILES$" do not have the trailing backslash
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
All the folders you get their location with the "Get Folder Location" command have that backslash at the end. You sometimes don't see it, because IA eliminates it when using it for installation. You need to be careful with it, double backslash harms sometimes, for example for the MS SQL Server plug-in.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
-
kamiller42
- Posts: 6
- Joined: Wed Mar 28, 2007 12:04 pm
I trying to do this, but when the second directory's browse button is clicked, it does nothing. I followed these instructions too.
I am using IA6. Does this work with IA6?Custom Path Browsing: Directory browsers, edit boxes, and browse buttons worked in sync only when assigned to the $TARGETDIR$ variable. All of these controls can now be assigned to work with custom variables also. This lets you build dialogs where multiple destination paths are chosen simultaneously.
To use directory browsers and edit boxes with a custom path variable:
a. Set their "Receives Information" field to "[Written Variable Value]",
b. Set their "Writes Values to Variable" field to your custom variable.
To use browse buttons with a custom path variable:
a. Set their "Performs Action" field to "Select Custom Folder",
b. Set their "Name" property to your custom variable.

