View Full Version : How to auto update the SdAskDestPath2 dialog installation path to a different value

03-07-2005, 09:50 AM
In my installation project I am allowing the user to specify the installation path. My question is I would like to update the path on the SdAskDestPath2 dialog to appended value from the user selection.

For example if the user selects c:\test . I would like to append "Product" to the value after the selection so the dialog installation path now reads

Any help would be appreciated.


03-07-2005, 12:19 PM
The AskDestPath returns svDir (one of its parameters) which is then assigned to TARGETDIR. In order to append extra values to it just add a line of code like this:

svDir = svDir ^ "Secondary Folder";

Hope that helps.


03-15-2005, 03:59 AM
My question was different. I am doing the step explained to append the new path. My question was how to make the dialog to show the new path. Setting TARGET is not update the UI dialog path


03-15-2005, 01:04 PM
Hi Ravi,
Sorry for the misunderstanding.... If you would like to the new version to be displayed on the dialog itself you will need to edit the code for the dialog itself. This code is located at InstallShield 10.5\Script\isrt\src. You will need to edit the code that sets the text on this dialog to allow it to append the "Product" folder.


04-20-2005, 02:12 AM
Isn't modifying the programs source dangerous? This will affect everyone that uses the IS program. Besides, I don't think modifying the code won't resolve the question he is asking.

Here is a suggestion:
I'm assuming as soon as the user finishes browsing for the directory he wants to install (your example c:\test) and clicks ok. You want the dialog to show "c:\test\product", correct? If so, a trick I did was to do a call on the same dialog again with the updated path. This worked for me. Let me know if you need any help.

04-21-2005, 11:45 AM
Hi Danny,
You have the option of "Importing" the script dialogs that I referenced. If you import the script into your project then the changes that you make are only used for the current project. That's why its important to make sure that if you have custom code in a script surrounding the dialog that you use the #include "XXXXXDlg.rul" so it uses your custom code not the default code.