This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Want to pass a variable into a silent install setup prerequisite
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 09, 2008
05:37 AM
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...
I'd like something like...
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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 09, 2008
07:52 AM
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.