Summary
Use InstallChangeFolder style dialogs to allow users to set other properties.
Synopsis
This article explains how to create a dialog like the prepackaged InstallChangeFolder and apply it to a property other than INSTALLDIR. It explains how to create a dialog that allows users to visually select a directory and then set the value of a property to that path.
The procedure explained in this article can only be used if the value of the property in question is an existing path, such as C:\Program Files\InstallShield\InstallShield for Windows Installer\Support.
Discussion
The following steps explain how one can create a functioning dialog named InstallChangeDIRVAR that allows users to set the value of a property called DIRVAR to a selected path.
Step 1: Create the property
Open the Property Manager and create the property DIRVAR. Give it an initial value that is an existing path on the hard drive on which the installation will run, such as C:\.
Step 2: Copy the dialog
Make a copy of the InstallChangeFolder. Name the new dialog InstallChangeDIRVAR.
Step 3: Create an entry in the directory table for DIRVAR
Open the Direct Editor and go to the Directory table. Create a new entry and fill it out as follows:
| Directory | Directory_Parent | DefaultDir |
|---|---|---|
| DIRVAR | TARGETDIR | . |
Step 4: Adjust the dialog that calls InstallChangeDIRVAR
In this example, we will adjust DestinationFolder, the same dialog that spawns InstallChangeFolder, to spawn our new dialog, InstallChangeDIRVAR. However, you can choose any dialog to spawn InstallChangeDIRVAR and apply these changes to that dialog.
Create a new PushButton on the DestinationFolder dialog. This is the button that pops up InstallChangeDIRVAR. Now, go to the Behavior view of DestinationFolder and highlight the new PushButton.
Create two new events for this PushButton:
- First, set up a SpawnDialog event with
InstallChangeDIRVARas an argument. This causes theInstallChangeDIRVARdialog to be popped up when the button is clicked. - For the other event, enter
[_BrowseProperty]into the event field. Make its argumentDIRVAR. This sets_BrowsePropertytoDIRVAR. The condition for both of these events should be 1.
The Behavior view of the new PushButton should look like this at the end of the step:
| Event | Argument | Condition |
|---|---|---|
| SpawnDialog | InstallChangeDIRVAR | 1 |
| [_BrowseProperty] | DIRVAR | 1 |
Step 5: Make sure that the dialog that calls InstallChangeDIRVAR is called by another dialog
If you have not already done so, make sure that DestinationFolder or whichever dialog calls InstallChangeDIRVAR is actually called by the next button of another dialog.
It is easiest to change the argument of the NewDialog event of the Next button on the CustomerInformation dialog from its default value of SetupType to DestinationFolder. Also, change the argument of the NewDialog event on SetupType's Back button to Destination folder.
Step 6 (Optional): Create a custom action that pops up DIRVAR
If you want to make certain that InstallChangeDIRVAR is working correctly, create a custom action that pops up the value of DIRVAR. If you do not know how to do this, see Creating a Custom Action that Displays a Property.
Then, select DesinationFolder's Next button in the Behavior view and add a DoAction event with a condition of 1 and specify your custom action as an argument. Your custom action should pop up the path that you select with the InstallChangeDIRVAR dialog.
WARNING: Your project must have a component or the SetTargetPath event on InstallChangeDIRVAR's OK button will fail with error 2731. SetTargetPath is not necessary; it checks to see if the path given to it as an argument is actually a valid writable path.
Additional Information
How Do the DestinationFolder and InstallChangeFolder Dialogs Work?
Related Articles
How do the DestinationFolder and InstallChangeFolder Dialogs Work? 8Number of Views How to Use Source Paths to Allow Sharing the Same Project File on Different Machines 17Number of Views How Do You Allow Users to Run lmdown After Starting License Server the -2 -p Switch? 6Number of Views User accounts can view the Users tab, under System Settings, despite having the 'Configure user properties' option set to… 5Number of Views How to Set the Maximum Licenses for a Single Feature a User or Group Can Use? 9Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago