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

Install feature prerequisite in silent mode

Hi All,

I have Basic MSI projects which include prerequisites. The prerequisites are associated to a feature named 'Feature1'.
The prerequisite are running with msiexec.exe and in the command line for the application I use/send properties.
Some of the properties are set by an installscript function named "Function1".

In UI Sequence, first I run custom action of "Function1" (As mentioned above, the function sets the properties),
and then (I'm not sure which action is doing that…maybe: ExecuteAction) 'Feature1' is installed, including the prerequisites.

In silent mode (Execute sequence), as I understand, the prerequisite is running by default and because "Function1" is not running yet and doesn't set the properties - the prerequisite installation is FAILED.

My questions are:
1) How can I control the execution of prerequisites in SILENT mode?
Currently the prerequisites are running twice: first as default and second by 'ISInstallprerequisite'

2) Can i use/send properties to prerequisites in SILENT mode?


Please advice.
Thanks
Labels (1)
0 Kudos
(8) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

In silent mode, both setup and feature prerequisites are run directly from the main setup.exe. The .msi is not executed at all until after all prerequisites are chosen. Unfortunately this means that custom actions cannot impact the prerequisites in any way during a silent installation. If there's a reasonable default value, this scenario might read the original property value (I can look into that, or you can test by just adding it to your Property table), but if there's no reasonable default I'm not sure what to suggest.
0 Kudos
Barvaz
Level 6

Hi Michael,

So what can be a workaround?
Our prerequisites depend on InstallScript functions which must be evaluated before the prerequisites run. That's the whole idea of having feature prerequisites instead of Setup prerequisites!

You can't just say that it is not supported on silent.
If it is supported on UI installation then there should be a silent support.
We will not design two different Setups.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Can you require they specify the property on the command line as well?
0 Kudos
Barvaz
Level 6

We can ask the users to add them to the command line, but it wouldn't be user-friendly.

We can't ask the customers to type +10 variables.
Please understand that we have several prerequisites in the setup, each one with its own calculated properties.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

It sounds like the way you're using prerequisites is pushing the envelope and thus running into technical limitations of how prerequisites function. Can you calculate these parameters in some other fashion? Perhaps write a helper executable which is launched as the prerequisite's application; it will do the calculation and then call the original executable with additional command-line arguments.

Have you tried suite projects to see if they better support your needs?
0 Kudos
Barvaz
Level 6

I'm sorry to insist but I do not understand how in UI sequence installation my custom action CAN run before the feature prerequisite and in Execute sequence installation it CAN'T.
0 Kudos
Barvaz
Level 6

I'd love to hear the sentiment / opinion about what I needed:
One example of feature prerequisite issue that I have:
My product required Exceed prerequisite installation which required few parameters – that prerequisite define as feature prerequisite
One of them is INSTALLTION_PATH (Where to install Exceed)
That INSTALLTION_PATH variable can be set by:
1. Generate by custom action:
• If 32 bit => INSTALLTION_PATH= [ProgramFilesFolder]Exceed
• If 64 bit => INSTALLTION_PATH= [ProgramFiles64Folder]Exceed

2. The INSTALLTION_PATH sent by customer as property

In silent mode in case the user didn't send/set value to the property than the program need to generate default option (depending on the machine) as describe in paragraph 1 and then run the feature prerequisite.

What is your recommendation?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

With UI, other actions can precede the ISInstallPrerequisites actions. Without UI, there are no actions run by the MSI before launching the execute sequence, and all prerequisites must precede launching the execute sequence.

I would recommend a helper exe or a Suite project. The helper exe might be able to figure out the messy scenarios; the suite project lets you conditionally set things up (for the nearest equivalent scenario) even in silent mode.
0 Kudos