How to run an EXE installer as part of my MSI setup - Advanced Installer Community
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

How to run an EXE installer as part of my MSI setup

I have an existing setup for our product which creates an MSI file. Now I need to install a third-party package, which comes as an EXE file (it was built using 7-Zip's installation feature, if that matters). First, I tried adding it as a Prerequisite Pre-install. That worked, EXCEPT that it changed my installer file from MSI to EXE.

I found this which explained why: viewtopic.php?t=27609 (and that all makes sense).

However, when I tried moving the prerequisite from the Pre-install folder to the Feature-based folder (and changed the Package Type back to Single MSI), my prerequisite is NOT being run.

What boat am I missing here? I'm not really an "installer guy", so I'm floundering a bit here. Any guidance GREATLY appreciated!

Cheers,

--mkj
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

Re: How to run an EXE installer as part of my MSI setup

I'm still struggling with this, so I spent some time carefully going through the help file. I found this on the page titled "Prerequisite Setup Files Tab", right at the bottom of the page:
For feature-based and post-install prerequisites, on below Enterprise project types only the "Full UI" install command line can be used and the prerequisite will be installed only if the main package is run with full UI. All other command line fields will be ignored and the prerequisite will not be installed if the main package is installed with silent or basic UI.
This installer does not seem to display a UI, which is intentional, but I don't know how that is accomplished. Could that be why my prerequisite is not running? What does it mean "below Enterprise project types"? How do I find out what type of project this is?

Thanks in advance for any help,

--mkj
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

Re: How to run an EXE installer as part of my MSI setup

Oh, and I've attached the AIP file. That would probably be helpful :oops:
Attachments
PPA.aip
(63.79 KiB) Downloaded 671 times
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

Re: How to run an EXE installer as part of my MSI setup

OK, I've found the Project Type on the Options dialog, and it is set to "Professional", which is indeed below Enterprise.

Any suggestions on how to figure out how they managed to get this MSI to run with no UI? Where should I look for such a setting?

--mkj
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

Re: How to run an EXE installer as part of my MSI setup

I've finally figured out that the "Project Type" is really just the "License Level", and these guys use "Professional".

It appears that I must upgrade to "Enterprise" in order to accomplish what I want to do. Can someone confirm that is the case?

If so, I would really like to try it before I tell the client they have to spend a couple of grand to upgrade their two licenses. Is there any way I can do that (given that I have already installed the "Professional" license version)?

--mkj
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to run an EXE installer as part of my MSI setup

Hi and welcome to our forums.

Indeed, a "Professional" package can install "feature-based" and "post-install" prerequisites only if it is installed with Full UI. Since the EXE package that you want to install is a 7-zip archive, you can try to add it as a custom action in order to install it from a package created with the "Professional" edition.

If you want to test the "Enterprise" edition, you can install the latest version of Advanced Installer, so you will automatically get a 10-days free trial. Then, backup your project, go to the "Project Type" tab and upgrade it to the "Enterprise" type.

Let me know if you have other questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

Re: How to run an EXE installer as part of my MSI setup

The help page for "How to launch a file after installation" has this at the top:
The following article uses options that are available starting with the Enterprise edition and project type.
So it seems this ALSO require an Enterprise license. Or is there some other custom action to launch a file that works with Professional (and NOT with full UI)?

--mkj
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

Re: How to run an EXE installer as part of my MSI setup

I added a "Launch Attached File" custom action, and it prompted me for the file (which I assume is the EXE file I want to run).

I moved the action from "Finish Execution" to "Finish Dialogs" stage.

But, when I double-click the MSI, it is not running my custom action. What am I doing wrong (I've attached this AIP file).

I would also like to know why no UI is ever shown. I inherited this project, so I can't ask the original author. My client *wants* it to be silent, so that's fine; I just wish I understood *how* it was accomplished. And if that's why the custom action is not running.
Attachments
PPA.aip
(59.88 KiB) Downloaded 729 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to run an EXE installer as part of my MSI setup

Hi,

Indeed, the custom action is not executed because the package is installed with Basic UI in which case only the actions from the "Install Execution Stage" are executed. Can you move it to that stage and see if it works?

The dialogs are not shown because the "Limit to basic user interface (simple progress and error handling)" option is set in the "Install Parameters" page of the project.

Regarding the "How to launch a file after an installation" article, indeed, it contains methods that can only be implemented in an "Enterprise" project, but the first one can also be implemented in lower project types.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

Re: How to run an EXE installer as part of my MSI setup

Firstly, thanks for taking time to read my myriad questions and answer--it's been very helpful!

I moved the custom action to Install Execution Stage, and that worked--thanks! In fact, since all I really need is to install it with the default options, I could pass it the command-line switch to install silently.

Now I want to configure it. I was able to add another Custom Action to run it's config program; that worked, but all that really does is write a bunch of stuff to the registry. To avoid problems causes by the user entering the WRONG config parameters, I figured I could just add the required info to the Registry section under Resources.

It seems to add the sections OK, but when I restart the system, the changes are not taking effect (for the other program--which is ImDisk, for creating a RAM disk). I'm currently trying to figure out why this is the case. Anything special I should know about this, from the AI perspective? I wondering if this is a persmissions problem (I tried making the keys Full Control for Everyone, but that didn't seem to help). Two of the keys I add a for new System Services; perhaps those require something special?

--mkj
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

Re: How to run an EXE installer as part of my MSI setup

I never did get to the bottom of why using the Registry section did not work. The keys and values were there, but the services would not start.

What I did in the end was to configure them manually, export the relevant keys to .REG files using RegEdit.exe, and then combined them into a single .REG file, which I install with the rest of my code. I have a custom action at the end which runs REG.EXE IMPORT [#ConfigRamDisk.reg].

It all works like the client wants now. Thanks for all your help!

--mkj
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to run an EXE installer as part of my MSI setup

Hi,

I'm glad you got everything to work.

I'm not sure why your services did not start when you used the "Registry" page support. This might have happened if the services searched for the registry entries in the 64-bit portion of the registries, but they were written by the installer in the 32-bit portion (under the Wow6432Node key). To write them in the 64-bit portion, you need to set the "Mark as 64-bit component" option for them.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mkjones
Posts: 11
Joined: Tue Jun 05, 2018 9:14 pm

Re: How to run an EXE installer as part of my MSI setup

I thought that might have been it, so I tried both ways (with and without 64-bit checked), and it made no difference. It's a puzzle, but at least one that is no linger blocking me :-)

Thanks for all your help!

--mkj
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to run an EXE installer as part of my MSI setup

You're welcome. I'm glad you managed to implement a solution for this.

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

Return to “Common Problems”