PhilB
Posts: 95
Joined: Fri Jul 06, 2007 4:13 pm

Registry search in merge module

I have a merge module project with several components. I am attempting to condition the install of one of the components with the result of a registry search, i.e. if a particular value is present, then don't install the component. This does not appear to work :( . I've tried adding a CA to show the result of the registry search but this always shows as empty. The test of the registry search form the AI development environment is successful. If I do the same things in a stand-alone msi then everything works. Is this functionality not supported in a merge module project?

Phil
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry search in merge module

Hello Phil,

In order to access within your main installation project a property contained by your MSM, then you should use reference it by using the MSM GUID like this:

Code: Select all

MY_PROP.<GUID>
where the <GUID> is the merge module GUID which can be accessed from merge module project -> "Module Details" page.

So, if you need to condition the installation of a component explicitly added in your main project (in "Organization" page of the main project) then you should reference the property by using the MSM GUID.

Let us know if this helped, otherwise please try to isolate the behavior in a buildable sample (.AIPs of the MSM and main project and their referenced files) and send it us to support at advancedinstaller dot com so we can investigate.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PhilB
Posts: 95
Joined: Fri Jul 06, 2007 4:13 pm

Re: Registry search in merge module

Hi Daniel,

That isn't quite what I meant. I am trying to do the conditioning within the same merge module NOT from the parent msi. I'll send a toy project shortly.

Regards,

Phil
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry search in merge module

Hello Phil,

When using an "Execute Inline Script Code" custom action, even if it is added in the merge module project, you should reference an installer property by appending the MSM GUID. This is our current implementation. So, you should use a script body like this (for the custom action added in the "Custom Actions" page of the merge module):

Code: Select all

msgbox session.property("TEST.2CB69F57_4B57_4DB8_881A_C173128573AF")
and this should work correctly.

Let us know if this worked.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PhilB
Posts: 95
Joined: Fri Jul 06, 2007 4:13 pm

Re: Registry search in merge module

Hi Daniel,

That works fine but I've now realised what the crucial difference between the simple example I sent you and my actual project is.

The merge module registry search does not create the result property if the registry key being searched contains a property value itself.

i.e. if I search for the value TestVal in HKLM/SOFTWARE/Phil/Test everything is OK, but if I search in HKLM/SOFTWARE/[Name]/Test where [Name] has been set to Phil it fails.

The test in AI itself works in both cases.

I'm using AI 11.0.

Phil
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry search in merge module

Hello Phil,

I've tested the scenario using AI 11.0 but everything goes fine. Can you please send us the .AIPs of your merge module and main project or another sample replicating the behavior so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PhilB
Posts: 95
Joined: Fri Jul 06, 2007 4:13 pm

Re: Registry search in merge module

Hi Daniel,

I've sent you another sample that hopefully demonstrates the issue.

Regards,

Phil
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry search in merge module

Hello Phil,

Thank you again for your sent sample. Indeed, it seems if you are using into a registry search (added in your merge module project) a formatted reference of a property added in "Module Details" page of your MSM project, then the registry search will fail. This seems to be an Advanced Installer issue. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention. We'll update this thread when the fix will be out.

Until then, as a workaround, you can simply remove the related property from "Module Details"page, go to "Custom Actions" page (of your MSM) and add a "Set installer property" with sequence, scheduled before "Wizard Dialogs Stage -> Searches" and "Install Execution Stage -> Searches" action group, like this:
  • Property: Name
    Value: Phil
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Registry search in merge module

Hello,

This was fixed in version 12.6 of Advanced Installer released on December 8th, 2015.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”