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!

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

Use Of A MSM Folder Property In An Environment Variable

I have an MSI containing a MSM where I've set the "Folder" column to a global property (INSTALLDIR) defined in the MSI.

Looking at the log file. on install, it looks like the Merge Module sees it (MSI (s) (64:04) [17:52:54:721]: Dir (target): Key: INSTALLDIR , Object: C:\Program Files\Cicero Inc\) with the proper value passed in by the MSI.

My problem is when I try to define an Environment Variable in the MSM with the value of [INSTALLDIR] then the resulting property has "nothing" in it in the MSM, e.g.:

MSI (s) (64:04) [17:53:28:459]: Executing op: UpdateEnvironmentStrings(Name=CiceroRoot,,Delimiter=[~],Action=536870913,)

How to I address this? Define a local property INSTALLDIR in the MSM?

This is used to load the MSM's contents to a folder other than AppDir and it seems to work fine in that regard.

Scott
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Use Of A MSM Folder Property In An Environment Variable

Hello Scott,

In order to achieve what you want you should set the related environment variable value using the APPDIR property.

Let us know if this helped.

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: Use Of A MSM Folder Property In An Environment Variable

Yes going to try something like that but I think I'm struggling through Session level properties (e.g. INSTALLDIR) vs. local MSM properties (INSTALLDIR).

Is the recommended way of doing this is have every MSI parent define the property (e.g. INSTALLDIR) in their Install Parameters list and then have the MSM do something like:

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

Re: Use Of A MSM Folder Property In An Environment Variable

Hello,

Please keep in mind that the recommended way to achieve what you want is to use the APPDIR property.

Here's attached a sample merge module project, created using version 9.9 of Advanced Installer, which implements this scenario.
sample.zip
(1018 Bytes) Downloaded 509 times
If you have any questions let us know.

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: Use Of A MSM Folder Property In An Environment Variable

<comment retracted>
Last edited by sjeslis on Tue May 07, 2013 4:13 am, edited 1 time in total.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Use Of A MSM Folder Property In An Environment Variable

Thanks
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Use Of A MSM Folder Property In An Environment Variable

You're welcome. Glad to help.

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

Return to “Common Problems”