cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tim_Mayert
Level 9

Can you pass in properties to a Prerequisite?

One of my basic MSI installs has to include Java JRE in static mode, so I created a prerequisite that will launch the Java JRE install .exe file in silent static mode. This all works fine, but since it is installed in static mode we want to be able to specify the INSTALLDIR so that it installs the Java JRE under our application folder, into a sub-folder.

So I would like to know if there is a way I can pass in a property to this pre-requisite to have it's INSTALLDIR redirected to our product folder?

I can place the folder name into the pre-requisite itself, but then the parent would have to be restricted to that folder and therefore not allow the user to change it. so if this is possible then let me know how.

Thanks,
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

This depends on when you're installing this prerequisite. INSTALLDIR is generally not known at the time a Setup Prerequisite is installed, so if you are using a Setup Prerequisite, you would be restricted to choosing your installation folders without user feedback. However Feature Prerequisites can reference any property in their command line, and they are executed after INSTALLDIR is specified in the UI sequence. See "Specifying Command-Line Parameters for an InstallShield Prerequisite" in the help for some more information.
0 Kudos
Kevin_L
Level 5

Hi,

I have the same problem. I use Feature Prerequisites and I can't change the INSTALLDIR value of prerequisites.

I fill the field "Specify the command line for the application" for each feature prerequisites with the following value :
[CODE]/s /v"/qn ALLUSERS=1 /norestart INSTALLDIR=[INSTALLDIR]"[/CODE]

What's wrong with my command line ?

Regards,

Kevin
0 Kudos
Kevin_L
Level 5

I just change the order of my arguments and it's works !

[CODE]/s /v"/qn ALLUSERS=1 INSTALLDIR=[INSTALLDIR] /norestart"[/CODE]

😄
0 Kudos