We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

alter_ego_dev2
Posts: 25
Joined: Wed May 10, 2023 4:09 pm

How to pass dynamic value to merged module?

Hey,
My installer project has a merged module with NETADAPTERCX21_Property parameter.
It is not clear how I could dynamically pass the parameter in Advanced Installer project.
There is Parameters section In the Configure Merge Modules, the section has one item NETADAPTERCX21_Property. I can enter a value, but it is not clear how to set the value dynamically. I already have tried to create NETADAPTERCX21 property and add [NETADAPTERCX21] as value and it didn't work for me.
XML code:

Code: Select all

  <COMPONENT cid="caphyon.advinst.msicomp.MsiMergeModsComponent">
    <ROW Module="ovpndcoamd64.msm" Path="..\..\ovpn-dco-amd64.msm" Feature="OvpnDcomergemodule" Directory="APPDIR" Params="NETADAPTERCX21_Property=[NETADAPTERCX21];" Order="1"/>
  </COMPONENT>
In a WiX installer example, the configuration is pretty simple:

Code: Select all

        <Property Id="NETADAPTERCX21">
            <DirectorySearch Id="searchAdvApiDir2" Path="[SystemFolder]" Depth="0">
                <FileSearch Id="searchAdvApiDir2" Name="advapi32.dll" MinVersion="6.3.20348.0"/>
            </DirectorySearch>
        </Property>

        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="$(var.PROGRAM_FILES_DIR)">
                <Merge Id="OvpnDcoMergeModule" Language="0" DiskId="1" SourceFile="ovpn-dco-$(var.PRODUCT_PLATFORM).msm">
                    <ConfigurationData Name="NETADAPTERCX21_Property" Value="[NETADAPTERCX21]" />
                </Merge>
            </Directory>
        </Directory>
Could you please help to convert WiX example to Advanced Installer?
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: How to pass dynamic value to merged module?

Hello,

If I understand this correctly, you want to access a property from your merge module in your main package.

To do so, please have a look over the following thread:

Re: Merge Module Custom Action With NOT Property Condition

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”