cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Techie42
Level 6

How to modify the selected install path?

Is there a simple way to modify the install path to add a folder

The default install dir for my installer is "C:\Program Files\MyCompany\MyApp".

Is there a way to modify the install path so that no matter what the customner selects the installer will still install to "Customer's selected Path\MyApp" ???

Thanks,

Bradley
Labels (1)
0 Kudos
(10) Replies
RobertDickau
Flexera Alumni

If you give a relative directory as a feature's or component's Install Location setting, it will be appended to the parent item's (or items') destination.

For example, if the product's install location is C:\Somewhere and a component's install location is subdir, files in that component will be installed to C:\Somewhere\subdir...
0 Kudos
Techie42
Level 6

RobertDickau wrote:
If you give a relative directory as a feature's or component's Install Location setting, it will be appended to the parent item's (or items') destination.

For example, if the product's install location is C:\Somewhere and a component's install location is subdir, files in that component will be installed to C:\Somewhere\subdir...


Thanks Robert but this is for an existing install with many already defined features, components and custom actions. So is there a way to reset the install path property to append a folder name afyer the destination dialog?

I was looking at doing this in the destination dialog events but this does not work in silent mode (as it does not look like silent mode sets that path; which makes sense in most cases.)

Bradley
0 Kudos
RobertDickau
Flexera Alumni

I haven't tried it, but perhaps a Set Product Bean Property action that sets the root bean's installLocation (or absoluteInstallLocation) property to the current value plus your subdirectory name?
0 Kudos
Techie42
Level 6

RobertDickau wrote:
If you give a relative directory as a feature's or component's Install Location setting, it will be appended to the parent item's (or items') destination.

For example, if the product's install location is C:\Somewhere and a component's install location is subdir, files in that component will be installed to C:\Somewhere\subdir...


Well I have tried this but I am still able to install to c:\. Our system test guys have flaged this as a show stopper. No I can keep most of the components out of the root but _jvm can still end up one folder above C:\MyApp\.

Bradley
0 Kudos
Techie42
Level 6

RobertDickau wrote:
I haven't tried it, but perhaps a Set Product Bean Property action that sets the root bean's installLocation (or absoluteInstallLocation) property to the current value plus your subdirectory name?



Okay I gave this a try. No joy. absoluteInstall Location remains unchainged from what I set it to in the Destination Dialog. I set the Wiard Action just after the Destionation Dialog. Maybe I got it wrong?

Bean ID: Bean7
Active: True
Product Bean ID: bean45
Product Bean Property Name: absoluteInstallLocation
Value: $P(absoluteInstallLocation)\myApp

Bean45 is the top most bean in my Product tree an displays the product name.

Bradley
0 Kudos
RobertDickau
Flexera Alumni

Regarding the placement of the _jvm directory (before going down the set-a-property path), can you change that in Application Data > Launchers > Advanced View (tab at the bottom of the IDE) > Product Uninstaller > Product Uninstaller JVM Resolution > Install Location?
0 Kudos
Techie42
Level 6

RobertDickau wrote:
Regarding the placement of the _jvm directory (before going down the set-a-property path), can you change that in Application Data > Launchers > Advanced View (tab at the bottom of the IDE) > Product Uninstaller > Product Uninstaller JVM Resolution > Install Location?


Cool. Thanks.

However I got it working late last night with your second suggestion. So once again Thank You! This works....

Added a Set Product Bean Property action that sets the root bean's installLocation.

Bean ID: Bean7
Active: True
Product Bean ID: bean45
Product Bean Property Name: installLocation
Value: $P(absoluteInstallLocation)\myApp

I am ont 100% sure wht changing installLocation after the destination dilaog also changes the absoluteInstallLocation. But it does work.

Thank you Robert!

Bradley
0 Kudos
Techie42
Level 6

Robert,

One more question. How to I PREVENT this Wizard Action from running during a repair or update?

Bradley
0 Kudos
RobertDickau
Flexera Alumni

I'm a bit rusty, so there might be a simpler way, but perhaps search these forums for the "already installed condition" example? Given a product's UUID, it should tell you if the product is already installed...
0 Kudos
Techie42
Level 6

That works too.

Thanks again!

Bradley
0 Kudos