sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact:  Website

Passing Global Install Parameters To An AI Merge Module

Wed Jun 13, 2012 8:01 am

When my Merge Module existed as a Visual Studio Merge Module all global install parameters in the parent install, e.g. CXME_CONNECTION, were auto-magically seen by the child merge module.

Now that we converted that merge module to an Advanced Installer Merge Module those values don't appear to be seen by the merge module.

How do we correct that?
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

Bogdan
Posts: 2788
Joined: Tue Jul 07, 2009 7:34 am
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Wed Jun 13, 2012 4:25 pm

Hi,

All properties used in the main project, that includes the MSM should be visible once the package is built. Do you encounter problems accessing a certain property
from the main project in your merge module or all of them? Also, can you please send us a sample project, MSM and MSI projects, that reproduce the problem to
support at advancedinstaller dot com?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Wed Jun 13, 2012 5:53 pm

This is a Visual Studio Merge Module that was imported into Advanced Installer.

Strange enough I see via the logfile that the Merge Module picks up ADDLOCAL but not VSDFxConfigFile.

Note I have no parameters defined in the Merge Module's "module details" pane.

I thought to make these work I needed a custom action VBS inline script to do SET from a Session.Property? See: http://www.advancedinstaller.com/forums ... f=2&t=8495
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Wed Jun 13, 2012 6:13 pm

I noticed in the merge modules custom action table that GUIDs were applied to the parameter names which the parent MSM wouldn't have any use/knowledge of, e.g.

/installtype=notransaction /action=uninstall /LogFile= /bxss="[CXMY_BATCHXMIT_SENDSIZE.4E72A4E1538744C6A2EC5B2DE0D2CEDE]"... "[#_428C7B351710AE7620E1EA9D8E951531.4E72A4E1538744C6A2EC5B2DE0D2CEDE]" "[VSDFXCONFIGFILE.4E72A4E1538744C6A2EC5B2DE0D2CEDE]"

The parent MSM has a CXMY_BATCHXMIT_SENDSIZE parameter NOT CXMY_BATCHXMIT_SENDSIZE.4E72A4E1538744C6A2EC5B2DE0D2CEDE.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Thu Jun 14, 2012 2:10 pm

Part of the issue we've found is that the custom actions using the global install parameters are invoking InstallUtil, i.e. passed in like /installtype=notransaction /action=install /LogFile= /bxss="[CXMY_BATCHXMIT_SENDSIZE]" /ds="[CXMY_SERVER] "

But when you open the resulting CustomAction table with Orca you'll find:

/installtype=notransaction /action=uninstall /LogFile= /bxss="[CXMY_BATCHXMIT_SENDSIZE.4E72A4E1538744C6A2EC5B2DE0D2CEDE]" /ds="[CXMY_SERVER.4E72A4E1538744C6A2EC5B2DE0D2CEDE] "

which means a LOCAL copy of the variable is attempting to be used!
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

Bogdan
Posts: 2788
Joined: Tue Jul 07, 2009 7:34 am
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Fri Jun 15, 2012 2:49 pm

Hi,
VSDFxConfigFile
This is private property, you need to use public properties, i.e. only upper case letters in its name, to make sure it always keeps its value.
The parent MSM has a CXMY_BATCHXMIT_SENDSIZE parameter NOT CXMY_BATCHXMIT_SENDSIZE.4E72A4E1538744C6A2EC5B2DE0D2CEDE.
Every property, file, parameter or resource from a MSM can be accessed from the main Project only by using its NAME.GUID. The Merge Module's GUID can be found out from the Merge Module Project's "Merge Module Details Page" or by using Microsoft Orca.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Fri Jun 15, 2012 2:54 pm

Yes I understand all that Bogdan.

The question remains, how do I access the global values from the parent MSI in the custom action data field as me entering "CXMY_BATCHXMIT_SENDSIZE" gets turned into "CXMY_BATCHXMIT_SENDSIZE.4E72A4E1538744C6A2EC5B2DE0D2CEDE" when AI builds? These represent two different values, the first GLOBAL (defined in the parent MSI), the second being local within the MSM.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Fri Jun 15, 2012 8:53 pm

Doing the following:

Session.Property("CXMY_SERVER.4E72A4E1538744C6A2EC5B2DE0D2CEDE") = Session.Property("CXMY_SERVER")

as suggested in thread: http://www.advancedinstaller.com/forums ... f=2&t=8495

seems to cause a VBS "type mismatch" error so now I need to investigate... :evil:
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Sat Jun 16, 2012 12:14 am

Even using this as my action data:

Session.Property("CXMY_SERVER.4E72A4E1538744C6A2EC5B2DE0D2CEDE") = "127.0.0.1"

yields a "type mismatch at Line 1, Column 1"

:?:
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Sat Jun 16, 2012 12:41 am

Note to self: VBS needs to go in "Script Text" field NOT "Action Data" field :oops:
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact:  Website

Re: Passing Global Install Parameters To An AI Merge Module

Sat Jun 16, 2012 1:19 am

Bogdan wrote:Hi,
VSDFxConfigFile
This is private property, you need to use public properties, i.e. only upper case letters in its name, to make sure it always keeps its value.
The parent MSM has a CXMY_BATCHXMIT_SENDSIZE parameter NOT CXMY_BATCHXMIT_SENDSIZE.4E72A4E1538744C6A2EC5B2DE0D2CEDE.
Every property, file, parameter or resource from a MSM can be accessed from the main Project only by using its NAME.GUID. The Merge Module's GUID can be found out from the Merge Module Project's "Merge Module Details Page" or by using Microsoft Orca.

Regards,
Bogdan
Actually Bogdan I think VSDFxConfigFile is a special Microsoft one for MSMs. You can see via my log lines that this now works with an in-line script to set it locally within the merge module:

Parent MSI sets it via a custom action:

MSI (s) (AC:18) [19:10:27:401]: Doing action: SET_VSDFxConfigFile
Action 19:10:27: SET_VSDFxConfigFile.
Action start 19:10:27: SET_VSDFxConfigFile.
MSI (s) (AC:18) [19:10:27:401]: PROPERTY CHANGE: Adding VSDFxConfigFile property. Its value is 'C:\Program Files\Cicero Inc\XMRuntime\VSDFxConfigFile.xml'.
Action ended 19:10:27: SET_VSDFxConfigFile. Return value 1.

Child MSM then copies it to it's local version:

MSI (s) (AC!18) [19:10:30:515]: PROPERTY CHANGE: Modifying VSDFxConfigFile.4E72A4E1538744C6A2EC5B2DE0D2CEDE property. Its current value is 'Your Value'. Its new value: 'C:\Program Files\Cicero Inc\XMRuntime\VSDFxConfigFile.xml'.

and then uses it for ManagedInstall through InstallUtilLib (which is still failing me...):

MSI (s) (AC:18) [19:10:30:946]: PROPERTY CHANGE: Adding _3FBEF730_151C_4B91_9909_8EE5A8851975.commit property. Its value is '/installtype=notransaction /action=commit /ds="127.0.0.1 " "C:\Program Files\Cicero Inc\Cicero\Bin\Cicero.Core.CiceroClientServices.exe" "C:\Program Files\Cicero Inc\XMRuntime\VSDFxConfigFile.xml"'.
Action ended 19:10:30: _3FBEF730_151C_4B91_9909_8EE5A885_1.4E72A4E1538744C6A2EC5B2DE0D2CEDE. Return value 1.

ction 19:10:47: _1DBAE7AA_5CF6_431D_97D8_F67D58259D.4E72A4E1538744C6A2EC5B2DE0D2CEDE.
MSI (s) (AC:18) [19:10:47:059]: Executing op: CustomActionSchedule(Action=_1DBAE7AA_5CF6_431D_97D8_F67D58259D.4E72A4E1538744C6A2EC5B2DE0D2CEDE,ActionType=3073,Source=BinaryData,Target=ManagedInstall,)
MSI (s) (AC:D4) [19:10:47:059]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI58.tmp, Entrypoint: ManagedInstall
Error 1001. Error 1001. InstallUtilLib.dll:MsiGetProperty (hr=0x80028027): Bound to unknown type.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

Return to “Common Problems”