cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jimmahh
Level 2

Want to pass a variable into a silent install setup prerequisite

Hi,

Quite new to InstallShield so you'll have to forgive me if this is a bit of an obvious question 😉

First things first; I'm using InstallShield 2008 Pro.

I'm creating an installer to bundle up and deploy a Java app, I want to include a specific copy of the JRE with my app, all nicely bundled up in a single setup.exe file for the user to click on, specify an install directory if they don't like the default and then have app and JRE installed without any more fuss.

The final installed file structure would look roughly as follows: -

[RootInstallDir]
---[JRE_Dir]
---[Application_Dir]

...with the user having specified the location of [RootInstallDir].

I've got about halfway there by creating a setup prerequisite that silently installs the JRE, but what I can't work out how to do is dynamically pass the value for [RootInstallDir] to the command line for the silent install....

i.e.

I've currently got...
jre_whatever.exe /s /v/qn "INSTALLDIR=C:\myAppDefault\JRE"


I'd like something like...
jre_whatever.exe /s /v/qn "INSTALLDIR=[InstallDirPassedFromInstallShield]\JRE"


As this is installing the JRE as a prerequisite I think I might be out of luck here, isn't the JRE going to be installed before the dialog prompting the user to confirm/change the install directory is presented?

Would it be possible to include the JRE installer as a temporary/transitory file that the main installer chucks on the users machine during the install and invoke it as a custom action later in the install when I certainly do know what the value of [RootInstallDir] is?

Any advice would be much appreciated 😄

Cheers,
Chris
Labels (1)
0 Kudos
(1) Reply
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Most of that depends on what kind of installer the JRE is under the hood. If it's not an MSI, you could launch it at just about any time (preferably deferred, probably in system context) with a command line that Windows Installer can format for you. If it's an MSI, there's no good place to execute it during a silent MSI install other than as a prerequisite. That said, keep your eyes out for improved prerequisite functionality in our next release which might address this case.
0 Kudos