[Incident]: Some users report they are unable to access the case portal. Please see this community notice for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aditya_c
Level 3

Installing files from a merge module based on the per-user or per-machine context

I have files in a merge module that I need to install in either a per-user or per-machine installation context.

What is the best way to do this?

In my main BASIC MSI project, I have included this merge module. But the question is how to specify its destination folder when the installation is running. I want to be able to set its destination folder to either CSIDL_PERSONAL (for per-user) or CSIDL_COMMON_DOCUMENTS (for per-machine).

I can easily retrieve the values of the CSIDL folder paths but where and how do I set the destination folder for the files in the merge module when the installation is running.

HELP HELP HELP
Labels (1)
0 Kudos
4 Replies
Alpesh
Flexera Alumni

Hi Aditya,

First of all, when you are creating the merge module, make sure that the component destination is set to TARGETDIR. And then when you include that merge module in a Basic MSI project, you can right click the merge module and set its destination to match the MSI project's destination.

I hope this helps.

Thanks!
0 Kudos
aditya_c
Level 3

Hi Alpesh,

What you described is during the design-time process. However, I would like to do the assignment of the destination folder of the merge module during the installation process. In other words, when the installation is running, I would like to set the destination based on whether the installation is chosen to be per-user or per-machine.
0 Kudos
Alpesh
Flexera Alumni

Try using custom actions to set the directory value. Use the ALLUSERS property value to check if it is a per-machine or per-user install.
0 Kudos
DataAnalyzer
Level 7

I would also like help with this. I can get the user's selection from that Dialog which is great, but I don't understand what happens after that.

I need to adjust the root location of the registry (LOCAL_MACHINE vs. CURRENT_USER) and the location of the files (ALLUSERsPROFILE or USERPROFILE) based on the selection.

Is there an example of custom actions that could be used for this? Thanks.
0 Kudos