Edit XML File & Global Parmeters In A Merge Module - Advanced Installer Community
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Edit XML File & Global Parmeters In A Merge Module

Now that Edit XML File is supported in a Merge Module I was trying to set a value based on a global parameter, e.g. CXMY_OVERRIDE_UAC, that WAS NOT defined in the Merge Module's Module Details -> Properties panel at build time BUT instead gets created, or passed from the parent MSI, at runtime by a SET INSTALLER PROPERTY in the Merge Module.

It seemed like the XML file always got updated with an "empty value", e.g. <OverrideUACLaunch Value="" />.

Based on the log file it seems that AI_XmlConfig always ran after the property was created, i.e. this:

Line 556: MSI (s) (78:DC) [10:21:42:705]: Doing action: SetProperty_CXMY_OVERRIDE_UAC.4E72A4E1538744C6A2EC5B2DE0D2CEDE
Line 557: Action 10:21:42: SetProperty_CXMY_OVERRIDE_UAC.4E72A4E1538744C6A2EC5B2DE0D2CEDE.
Line 558: Action start 10:21:42: SetProperty_CXMY_OVERRIDE_UAC.4E72A4E1538744C6A2EC5B2DE0D2CEDE.
Line 560: Action ended 10:21:42: SetProperty_CXMY_OVERRIDE_UAC.4E72A4E1538744C6A2EC5B2DE0D2CEDE. Return value 0.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Edit XML File & Global Parmeters In A Merge Module

Hello,

This happens if you are not adding the merge module GUID to your installer property when editing the XML file within merge module project. In order to achieve what you want you should refer your property like this

Code: Select all

CXMY_OVERRIDE_UAC.4E72A4E1538744C6A2EC5B2DE0D2CEDE
in the edit XML file dialog from your merge module project.

This is our default behavior. We'll try to add an improvement regarding this in a future version of Advanced Installer. Thank you for bringing this to our attention.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Edit XML File & Global Parmeters In A Merge Module

Daniel, good idea!

How I handled it, because of time, is doubly defined it; in my parent MSI and in my Merge Module (with a "" default) but I like your idea much better.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Edit XML File & Global Parmeters In A Merge Module

Daniel,

The same format of the check needs to be done if trying to use the Global Parameter in a Component Condition check as well I assume?
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Edit XML File & Global Parmeters In A Merge Module

So "Global Values" passed to a Merge Module really can't be seen in the merge module's scope unless they are copied, VBScript, to the Merge Module's local scope?

e.g it always seems like I need a Custom Action in the merge module to do the following:

Session.Property("CXMY_DISCOVERYSTUDIO.1F25814F_82E4_4B48_AE10_92F731436E0D") = Session.Property("CXMY_DISCOVERYSTUDIO")
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Edit XML File & Global Parmeters In A Merge Module

Hello,

I apologize for my delayed reply. We are quite busy at the moment.

Yes, this is correct. Please take a look on our "Merge Module Parameters" thread which debates a similar issue.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”