cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jonaho
Level 2

Advertised Variables and Merge Modules

Hello,

I'm having an issue getting an "Advertised Variable" to appear in the "install" task in my project which uses my merge module.

I've Advertised the $USER_INSTALL_DIR$ variable in the preinstall, install, AND post install tasks in my Merge Module(MM). The only task I really need it in is the install task as I actually do not want to run the preinstall or post install tasks in the installer which calls the merge module. However, when I import the MM into my Merge Module Caller (MMCaller) as a dynamic module under Organization | Modules | Import Dynamic Merge Module, I only see my advertised variable under the pre-install and post-install tabs and not the install tab (where I really need it). So the only way to get the MMCaller to pass the USER_INSTALL_DIR to the MM at run time is to also execute the pre-install tasks, which doubles all the panes the user has to click through (license, user install dir, etc).

Also, I have redone several examples which were created identically from what I can tell and in one of them the $USER_INSTALL_DIR$ actually showed up as advertised under the install tab in the MMCaller (unfortunately this was not my actual project and I was only able to get it to happen once). Does anyone know how to get the variable to be advertised under the install task tab?

I would upload a sample project which I made, but this site must have a size limit.

Thank you 🙂
Jon
Labels (1)
0 Kudos
(2) Replies
pv7721
Level 20

You can try to zip it (the sample project you wanted to upload).
0 Kudos
jonaho
Level 2

Thank you PV7721 but it was already zipped and over the 1.95MB limit...However, I did see that "asl" files have a max size of 20MB. I'll try to rename the zip file with that extension and upload it with this post...here goes...Hey it looks like that is going to work. You'll just have to rename the file to ".zip"

BTW, I've done some more testing today and here are the results...

I found some interesting results (only two of which seem to be incorrect), or at least unexplained by the documentation. Below I will compare the difference between what the child merge module “advertises” vs what the parent installer “sees” as advertised.

#1 (Good Case, sees the advertised variable in the specified task)
Child MM Advertises:
A) Pre-Install:$USER_INSTALL_DIR$
Parent Installer Sees:
A) Pre-Install:$USER_INSTALL_DIR$

#2 (Good Case, sees the advertised variable in the specified task)
Child MM Advertises:
A) Install:$USER_INSTALL_DIR$
Parent Installer Sees:
A) Install:$USER_INSTALL_DIR$

#3 (Good Case, sees the advertised variable in the specified task)
Child MM Advertises:
A)Post-Install:$USER_INSTALL_DIR$
Parent Installer Sees:
A)Post-Install:$USER_INSTALL_DIR$

#4 (Good Case, sees the advertised variable in both tasks)
Child MM Advertises:
A) Pre-Install:$USER_INSTALL_DIR$
B) Install:$USER_INSTALL_DIR$
Parent Installer Sees:
A) Pre-Install:$USER_INSTALL_DIR$
B) Install:$USER_INSTALL_DIR$

#5 (Good Case, sees the advertised variable in both tasks)
Child MM Advertises:
A) Pre-Install:$USER_INSTALL_DIR$
B) Post-Install:$USER_INSTALL_DIR$
Parent Installer Sees:
A) Pre-Install:$USER_INSTALL_DIR$
B) Post-Install:$USER_INSTALL_DIR$

#6 (Bad Case, parent installer does not see the advertised variable in both tasks)
Child MM Advertises:
A) Install:$USER_INSTALL_DIR$
B) Post-Install:$USER_INSTALL_DIR$
Parent Installer Sees:
A) Install:<>
B) Post-Install:$USER_INSTALL_DIR$

#7 (Bad Case, parent installer does not see the advertised variable in all three tasks)
Child MM Advertises:
A) Pre-Install:$USER_INSTALL_DIR$
B) Install:$USER_INSTALL_DIR$
C) Post-Install:$USER_INSTALL_DIR$
Parent Installer Sees:
A) Pre-Install:$USER_INSTALL_DIR$
B) Install:<>
C) Post-Install:$USER_INSTALL_DIR$

Thank you,
Jon
0 Kudos