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
- :
- Calling InstallScript Custom Actions from a MergeModule
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
‎Jan 25, 2008
02:40 PM
Calling InstallScript Custom Actions from a MergeModule
I've written a Merge Module that contains 3 InstallScript Custom actions.
I've set the limited properties available on the custom actions in the .msm, but I can't seem to get these custom actions to run in the .msi generated from a project that includes the merge module. I opened the .msi itself with the InstallShield IDE and the custom actions are visible and clearly tied to the mergemodule, but they are not included in any sequence so they're not being called.
My project is a BasicMSI.
I wouldn't have expected this to work in 11.5 and earlier, but since the underlying guts changed in 12, I figured it would work now.
Is what I'm trying to do possible? If so, what have I done wrong?
Thanks
I've set the limited properties available on the custom actions in the .msm, but I can't seem to get these custom actions to run in the .msi generated from a project that includes the merge module. I opened the .msi itself with the InstallShield IDE and the custom actions are visible and clearly tied to the mergemodule, but they are not included in any sequence so they're not being called.
My project is a BasicMSI.
I wouldn't have expected this to work in 11.5 and earlier, but since the underlying guts changed in 12, I figured it would work now.
Is what I'm trying to do possible? If so, what have I done wrong?
Thanks
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2008
09:08 PM
TAke a look at the ModuleInstallExecuteSequence table ( and others ). Basically you teach the merge module where the CA's should be inserted in relationship to standard actions. This way when the MSM is merged into your resultant MSI you'll see your CA's in the InstalExecuteSequence table ( and others ).
http://msdn2.microsoft.com/en-us/library/aa370049(VS.85).aspx
http://msdn2.microsoft.com/en-us/library/aa370049(VS.85).aspx
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2008
08:02 AM
Thanks Christopher.
I did see this table on Friday and noticed that my actions weren't included there with the others that InstallShield created on its own based on the content of my MM.
I'll add my functions to the table and see what I can get going.
-Al
I did see this table on Friday and noticed that my actions weren't included there with the others that InstallShield created on its own based on the content of my MM.
I'll add my functions to the table and see what I can get going.
-Al
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2008
01:24 PM
Each exported function has to have a corrosponding CustomAction row and a corrosponding sequence row. Or you can create a common exported function and use it as a wrapper function ( main() ) for all the others. Eitherway checkout:
http://blog.deploymentengineering.com/2006/06/installscript-ca-performance-issue.html
If you are manually hacking the compiled dll realize that not all exported installscript functions get exported in the dll ( f1, f2, f3 when you look at it with depends.exe ) Only functions that get consumed by CA's actually get exported.
BTW, for somewhat relevant and fun is this article that I wrote:
http://www.macrovision.com/webdocuments/PDF/msi_ice.pdf?link_id=productsTipsTricks
http://blog.deploymentengineering.com/2006/06/installscript-ca-performance-issue.html
If you are manually hacking the compiled dll realize that not all exported installscript functions get exported in the dll ( f1, f2, f3 when you look at it with depends.exe ) Only functions that get consumed by CA's actually get exported.
BTW, for somewhat relevant and fun is this article that I wrote:
http://www.macrovision.com/webdocuments/PDF/msi_ice.pdf?link_id=productsTipsTricks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2008
01:43 PM
Its working great now, thanks for the info.
The issue that I thought I was having with the functions not getting called properly was because of a stupid error on my part. Long story short it was a situation where the content of the message box wasn't correct because of a cut/paste error.
I'm really surprised that InstallShield doesn't supply a way to add the custom actions to the sequence in a merge module. Having to edit the ModuleInstallExecuteSequence manually should be unnecessary as it is in an InstallShield project when setting up sequences.
The issue that I thought I was having with the functions not getting called properly was because of a stupid error on my part. Long story short it was a situation where the content of the message box wasn't correct because of a cut/paste error.
I'm really surprised that InstallShield doesn't supply a way to add the custom actions to the sequence in a merge module. Having to edit the ModuleInstallExecuteSequence manually should be unnecessary as it is in an InstallShield project when setting up sequences.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2008
01:52 PM
I suppose InstallShield is a little backwards in this area. If you look in your Basic MSI project, sequences view, you'll see you can right click insert a custom action and choose merge module as the source.
In theory, it'll do reflection against the merge module, show the CA and let you insert it. This can be useful where you want a the MSI project to have more control/flexibility in how to consume the merge module. However the MSI approach is the MSM dictates how it gets merged and IS probably show show this in their designers. But direct editor is there though....
In theory, it'll do reflection against the merge module, show the CA and let you insert it. This can be useful where you want a the MSI project to have more control/flexibility in how to consume the merge module. However the MSI approach is the MSM dictates how it gets merged and IS probably show show this in their designers. But direct editor is there though....
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2008
02:02 PM
However the MSI approach is the MSM dictates how it gets merged and IS probably show show this in their designers.[/QUOTE wrote:
This is definitely my goal because the msm will be included into multiple projects.