justintime91
Posts: 4
Joined: Mon May 07, 2018 2:54 pm

Installing Different Files and a Service Based on Search Condition

Hi All,

I would like to include 2 different versions of two different files (Needs To Install As The Same File Name) in an MSI file and determine which one to install based on a search condition for a registry value. Can this be done?

File1:

My-Worker.exe - the MSI needs to install the correct file based on the result of the search conditions. This file also installs a service.

File2:

My-Settings.exe - the MSI needs to install the correct file based on the result of the search conditions.
justintime91
Posts: 4
Joined: Mon May 07, 2018 2:54 pm

Re: Installing Different Files and a Service Based on Search Condition

I figured out how to install the correct file based on the conditions using this guide: https://www.youtube.com/watch?v=eLDhTwlEzIE

How could I launch My-Settings.exe from the main installed folder regardless of the one that was installed in the Launch Application pane? Image
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Different Files and a Service Based on Search Condition

Hello,
I figured out how to install the correct file based on the conditions using this guide: https://www.youtube.com/watch?v=eLDhTwlEzIE
You are correct. I'm glad you got this working by yourself.
How could I launch My-Settings.exe from the main installed folder regardless of the one that was installed in the Launch Application pane?
For this you can follow the steps from the Launch the file in a mixed package type article. Basically, you will set conditionally a property with the path of the file that is getting installed. At the end of the installation, you will use the property to launch the app.

Should there be any difficulties you encounter, please let us know and we will gladly assist you.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
justintime91
Posts: 4
Joined: Mon May 07, 2018 2:54 pm

Re: Installing Different Files and a Service Based on Search Condition

How can I change the Value for the files being installed?

Image

For example change [#PatchMyPCSettings.exe_3] to [#PatchMyPCSettings.exe_ForVersion3]
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing Different Files and a Service Based on Search Condition

Hello,

This can be done by right clicking in the "Value" field. Just choose the "File..." context menu option and then browse to the desired installation file and click [OK] button.

If this is not what you mean, just give us more details.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
justintime91
Posts: 4
Joined: Mon May 07, 2018 2:54 pm

Re: Installing Different Files and a Service Based on Search Condition

Daniel wrote:Hello,

This can be done by right clicking in the "Value" field. Just choose the "File..." context menu option and then browse to the desired installation file and click [OK] button.

If this is not what you mean, just give us more details.

All the best,
Daniel
I mean can I actually change the value that gets set for a file. For example, I have a few files with the same name using subfolder but installing them in the root. When I select a file value for the FILE_TO_LAUNCH property I get [#PatchMyPCSettings.exe_3] for the second file and [#PatchMyPCSettings.exe] for the first EXE file. Could I have this file value renamed to something like [#PatchMyPCSettings.exe_ForVersion3] ad [#PatchMyPCSettings.exe_ForVersion4]
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing Different Files and a Service Based on Search Condition

Hello,

In this case, when all of your files with the same name will be resolved to the same file path at install time, then instead of using a direct file reference in the "value" field you can use a folder reference appending the hard coded file name:

Code: Select all

[Folder_Dir_Property]PatchMyPCSettings.exe
Let us know if this was of no help.

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

Return to “Building Installers”