PKRU
Posts: 4
Joined: Wed Feb 27, 2013 11:54 am

How i can set APPDIR variable in included MSM from main MSI

Hi,

sorry, i'm very new in advanced installer, but i have a high priority life problem.

Is it possible to set the APPDIR (target installation path) variable for everey MSM module included in my main MSI. The values are stored in different variables in the main MSI. i need to set the APPDIR in everey included MSM module based on conditions.

Thanks for helping.

Best regards,
Peter
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: How i can set APPDIR variable in included MSM from main

Hi Peter,

The install path that your merge module will use is the folder that you specify in Merge Modules page, when you add it to the main project.

If you want to use a path that may change you must first define a property based folder using that property, then assign that folder to the merge module, when added to the project.
Please note that the property must be initialized with a valid path, otherwise it will fail to launch the installer.

Then, you can change the path as desired, using custom actions that set the desired path in the property attached to the property based folder.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PKRU
Posts: 4
Joined: Wed Feb 27, 2013 11:54 am

Re: How i can set APPDIR variable in included MSM from main

Bogdan wrote:Hi Peter,

The install path that your merge module will use is the folder that you specify in Merge Modules page, when you add it to the main project.

If you want to use a path that may change you must first define a property based folder using that property, then assign that folder to the merge module, when added to the project.
Please note that the property must be initialized with a valid path, otherwise it will fail to launch the installer.

Then, you can change the path as desired, using custom actions that set the desired path in the property attached to the property based folder.

Best regards,
Bogdan
Hi Bodgan,

thank you for helping.

I have some questions about yout post:

a. How i can define a property based folder?
b. How i can assign this folder to an merge module?

Sorry, but i'm very new in advanced installer.

Thank you for helping.

Best regards,
Peter
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: How i can set APPDIR variable in included MSM from main

Hi Peter,
a. How i can define a property based folder?
A property-based folder is a folder that takes its path from an user defined property. In order to create one you can follow the Folder Operations in the Files and Folders Page article.
b. How i can assign this folder to an merge module?
After you created the property-based folder, go in the Merge Modules page and add your merge module. Double-click on the merge module you added and in the newly appeared dialog click on the [...] button then select the folder you created from the list.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”