PDA

View Full Version : Merge Module Custom Actions Execute Regardless Of Feature State.



Tim Owers
08-18-2005, 09:54 AM
Merge Module A contains custom action A and is assigned to Feature A.
Merge Module B contains custom action B and is assigned to Feature B.
Both Merge Modules contain files.
During the install Feature A is deselected, all files within Merge Module A are not installed but custom action A still executes (and vice-versa).
How can I stop custom actions from executing if the Feature they are assigned to is deselected?

Thank you,
Tim Owers.

aventi
08-19-2005, 07:07 AM
Inside your MM you need to set conditions for your CA's in the MM against the component. Since your MM has no idea about the features it may or may not be associated. You do this in the ModuleInstallUISequence and ModuleInstallExecuteSequence tables.

For example:
If you have component Z and CA M, in MM A. You have to set in the ModuleInstallUISequence and/or ModuleInstallExecuteSequence the CA M and what order it needs to be inserted into a parent install. There is also a condition field. So, "$Z>2" could be a condition you use for CA M to say if component Z is to be installed local or run from source, execute CA M.

Tim Owers
08-19-2005, 07:48 AM
Aventi,
Thanks for replying, you are spot on. Just before reading your reply a colleague pointed out the obvious soloution. However yours is slightly better in that your condition evaluates > 2 whereas I was using = 3.
Cheers!
Tim.

Domnitch
03-09-2006, 10:35 AM
As I've understood this problem can be solved ONLY using merge module adjustment (adding special conditions to its Custom Action). But what can I do with third-party MSM's such as EAladdin HASP drivers?
Are there any tools for MSM lookup or adjustment?
May be this problem can be solved in any other way?

Thank you

aventi
03-09-2006, 10:40 AM
You most certainly can use Orca to modify the third parties merge module.
If the similar situation exists as Tim's with the third party, I would notify them this as a an error.

Domnitch
03-09-2006, 12:33 PM
aventi,

The problem seems to be the same as Tim's one.
I have IS 10.5 sp1, Basic MSI project, all the settings by default.
Two features -
Feature 1 with 1 component (readme.txt file) and
Feature 2 with HASP merge module hinst.msm v4.96 from ftp://ftp.aladdin.com/pub/hasp/new_releases/driver/HASP4_driver_MSI.zip

If I select Feature 1 and do NOT select Feature 2, I see the following error message and installation fails.

Error in custom action. The library hinstd.dll is invalid or could not be found.

If I select both features, no any error occurs, merge module installs drivers OK and installations finishes OK. To my mind it means the same behavior - msm files been copied feature dependantly, but Custom Action been done even if msm feature is not selected.

Sorry for my poor English
Thank you

aventi
03-09-2006, 12:38 PM
No need to apologize for your English.

Then definitely contact Aladdin and explain how they need to put a condition on their Custom Action to not fire if the Feature is not selected for install.

Good luck.

Domnitch
03-10-2006, 05:10 AM
Then definitely contact Aladdin and explain how they need to put a condition on their Custom Action to not fire if the Feature is not selected for install.
This sounds like a well-known old joke:

- How many Microsoft technicians does it take to screw in a light bulb?
- None, they would just declare Darkness the new standard TM

I still hope that InstallShield team will fix this bug in future.