hhale21
Posts: 26
Joined: Thu Apr 01, 2010 10:21 pm

Passing a parameter to a merge module

I have a custom action in a merge module that calls vbs script. It needs a folder that has to be passed in from the MSI.
I have read many posts on this forum but have not managed to get the folder passed. The MSM custom action "action data" has "[JDIR]"

I have tried adding property JDIR on the merge module details page and an enviroment var called JDIR as well as a custom action
System.Property(GUID.JDIR) = System.Property(JDIR) (where GUID is the MSM guid)

In the MSI when I add the MSM I see the parameter and assign "[JDIR]" to it.

When the install runs JDIR resolves to "" in all cases.

I would expect this to be a very simple thing to configure......
hhale21
Posts: 26
Joined: Thu Apr 01, 2010 10:21 pm

Re: Passing a parameter to a merge module

After more of the documentation, I am still not clear on how to pass parameters to a MSM.
This is what I have tried by the value passed to the custom action script is 'JDIR' instead of the resolved value.
This is what I have done...

I create a MSM.
I add a property to Module Details called 'JDIR'
Configurable -> Value -> Edit Config Parameter name is 'JDIR' type formatted, default value none
I see Value [=JAVADIR]

In the custom action "action data" I have "[JDIR]". This results in "JDIR" being passed to the script (not the resolved value)
I have also tried as per the docs "[JDIR.EB0C31E4_EE62_42D1_8864_399FA3CC23EC]" with no success. Docs indicate the if the property is used in a custom action it must be prepended by Module GUID. This results in "" (not the resolved value)

In the MSI I add the MSM. Configure Merge Module reveals a parameter called 'JDIR'
I set the parameter value to a folder.

So I am missing? Is there any examples projects to show how this is done or is there something in the docs that I have overlooked that describes in details how to accomplish.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Passing a parameter to a merge module

Hi,

Can you please send the aip files you are using and the VBScript to support at advancedinstaller dot com so we can investigate them?
I have also tried as per the docs "[JDIR.EB0C31E4_EE62_42D1_8864_399FA3CC23EC]" with no success.
This is correct, the GUID is required. Maybe it is to early when you are accessing the property and it hasn't been set yet, this is where the empty value
could come out.

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 a parameter to a merge module

I wish when Advanced Installer asks for the AIP file that they would post a follow-up as this thread would have helped me in my current problem. :?
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Passing a parameter to a merge module

Hello,

We usually follow up or let the user decide whether to contribute to the forum or not. Just follow the same routine and give us your scenario details and resources so we can investigate.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”