View Full Version : dynamic install directory

05-15-2003, 01:16 PM

I have the following problem. I need write a install program that allows the user to only change one part of the install path with a selected value (predetermined selected from a drop down list). I have been able to accomplish this by doing the following:

1. In the Product tab -> properties window -> installLocation is defined to be $D(install)/realmx/servers/$W(bean.Server)

2. In the Installer tab I created a "User Input Panel" with a radio button selecter that writes its value to the bean.Server values you see in #1 above.

3. A Destination window appears next with the created path.

It seems to work ok, however, if the user doesn't like the destination created /install/foo and they wanted /install/bar, when the hit the back button to the radio button page and change their selection to bar from foo, the new value doesn't propagate through. I have tested using multiple values and they all are settable once, however, you can't "go back" change the value once you leave the User Input screen and have the value "keep".

Am I missing something? I have used IS 7 pro before and can very easily do this in that program, however, I am using the Evaluation Version of MultiPlatform 5. (And have only been using MP 5 Eval for a day now.) We are trying to decide between using IS products and Install Anywhere. What am I overlooking?


05-15-2003, 04:14 PM
First of all, I am assuming that you are using the DestinationPanel here for verification that the property has changed. That's not the best way of making that check, since the destination displayed in that panel is not refreshed from the product tree when the panel is re-entered after its initial display. If you want to verify the property has changed, use a TextDisplayPanel with the "Text" property set to "$P(absoluteInstallLocation)", since that will obtain the property directly from the product tree each and every time the panel is displayed.


The "installLocation" property on the root of the product tree has a great deal of significance, since it is used to uniquely define the product itself (ie. a SoftwareObject is defined by it's SoftwareObjectKey and installation location). If the "installLocation" property of the root of the product tree is to be altered in any way, it should be sone through the product service methods used to set product bean properties, since that triggers several other operations that occur under the covers. I wont go deep into the details, for simplicity, but these additional operations are important for locating previous installation information for the scenario where the installation location is set to a location where the product was already installed. Basically, this is a long way of saying that you should set that product bean property directly, rather than indirectly through wizard bean properties that may change at any time (NOTE: $D is ok to use, since the associated values do not change once the install has begun).

To do what you are trying to do, try the following:

- Change the "installLocation" property of the product tree root to some default location that does not involve a wizard bean string resolver (ie. "$D(install)/realmx/servers/install/foo")

- Keep the UserInputPanel method that you are currently using to obtain information from the user for the installation location.

- Immediately after the UserInputPanel, add a "SetProductBeanPropertyAction" bean.

- Set the "Product Bean Id" property of the "SetProductBeanPropertyAction" to the bean id of the root product bean.

- Set the "Product Bean Property Name" property of the "SetProductBeanPropertyAction" to "installLocation".

- Set the "Value" property of the "SetProductBeanPropertyAction" to "$D(install)/realmx/servers/$W(bean.Server)"

Basically, you will be using the "SetProductBeanPropertyAction" bean to cause the "installLocation" property of the root product bean to be directly set. I just ran a test with this scenario and it works just fine.

NOTE: Again, if you want to verify that the property has been properly set, use the TextDisplayPanel methodology described at the beginning of this posting.

I hope this helps....