kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

Why use pre-install vs feature-based prerequisite for NET 6 desktop runtime

Hi, I was playing with the new installer wizard and used the NET Framework option. The resulting installer put the NET Framework 4.8 prerequisite under the pre-install section of the Prerequisite page, whereas when I manually add a NET 6 Desktop Runtime prerequisite (in other projects), AI always put the prerequisite under the Feature-Based section of the prerequisite page.

I couldn't find any dialog or UI option to put it under pre-install myself, so I took a chance and dragged the PR from Feature-based to Pre-install. AI popped up a message that the drag enabled the EXE Package Type. (I assume it was an MSI installer beforehand.) I thought maybe only EXE installers could use pre-install PRs.

Q1. Is it true that only EXE installers can put things in the Pre-Install section? Is the design intent there to completely finish all prerequisites before even starting up the MSI? Is that an advantage in some cases or something? (I would think the MSI installer would do the PRs first anyway and abort if the PR installations failed.)

Q2. Does it make any difference at all whether I put a NET Framework or NET 6 Desktop Runtime prerequisite under Pre-Install or Feature-Based? Won't the MSI installer install the prerequisite before installing the application files anyway? (Or maybe it does them in parallel or something?)

Although your web pages on MSI vs EXE strongly suggest using an MSI package, I can only access the optional colorful install dialogs using an EXE package. So, I am leaning toward EXE for my solopreneur, non-enterprise packages. Just for the fancier dialog colors (sigh).
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Why use pre-install vs feature-based prerequisite for NET 6 desktop runtime

Hi,
Hi, I was playing with the new installer wizard and used the NET Framework option. The resulting installer put the NET Framework 4.8 prerequisite under the pre-install section of the Prerequisite page, whereas when I manually add a NET 6 Desktop Runtime prerequisite (in other projects), AI always put the prerequisite under the Feature-Based section of the prerequisite page.
In order to manually add a prerequisite under the desired section, you can right-click on that section (see the image below) and select the "New Package/URL Prerequisite" options, except for the "Chained" prerequisites which have their own option. You can also first select the desired section, then use the "New Package/URL Prerequisite" toolbar buttons to add the prerequisite to that section.
Add Prerequisite.png
Add Prerequisite.png (20 KiB) Viewed 25375 times
I couldn't find any dialog or UI option to put it under pre-install myself, so I took a chance and dragged the PR from Feature-based to Pre-install. AI popped up a message that the drag enabled the EXE Package Type. (I assume it was an MSI installer beforehand.) I thought maybe only EXE installers could use pre-install PRs.
Sure, you can drag and drop a prerequisite from a section to another without issues (except from the "Chained" prerequisite which cannot be dragged to another section).
Q1. Is it true that only EXE installers can put things in the Pre-Install section? Is the design intent there to completely finish all prerequisites before even starting up the MSI? Is that an advantage in some cases or something? (I would think the MSI installer would do the PRs first anyway and abort if the PR installations failed.)
Yes, the "pre-install" prerequisites require an EXE package because they are installed by the EXE Bootstrapper before the MSI installation starts. There are many cases where "pre-install" prerequisites have an advantage and they are required instead of the "feature-based" prerequisites.

The "feature-based" prerequisites are installed after the "Dialogs" stage of the MSI installation (on Full UI) and at the end of the "Install" stage (on Basic UI and Silent installations) while the "pre-install" prerequisites are always installed before the MSI installation starts. So, if some "Dialogs" options/actions (on Full UI) or some "Install" actions from the MSI depend on other prerequisites, then those prerequisites must be added as "pre-install" prerequisites.
Q2. Does it make any difference at all whether I put a NET Framework or NET 6 Desktop Runtime prerequisite under Pre-Install or Feature-Based? Won't the MSI installer install the prerequisite before installing the application files anyway? (Or maybe it does them in parallel or something?
There are also prerequisites like "NET Framework" or some versions of "SQL Server Express" that cannot be installed as "feature-based" prerequisites because they conflict with the MSI installation. You can read more details in the "Why does .NET Framework fails as feature-based prerequisite" FAQ.
Although your web pages on MSI vs EXE strongly suggest using an MSI package, I can only access the optional colorful install dialogs using an EXE package. So, I am leaning toward EXE for my solopreneur, non-enterprise packages. Just for the fancier dialog colors (sigh).
There are many advantages of an EXE package over a MSI package in terms of UI (look and feel) and the functionalities it offers. Actually, the EXE Bootstrapper embeds the MSI package inside which is extracted and installed when the EXE is launched.

The MSI package is more friendly with some deployment services like GPO that do not support EXE packages. You can see a comparison in the "EXE or MSI Installer" article.

If you have other questions, just let me know.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

Re: Why use pre-install vs feature-based prerequisite for NET 6 desktop runtime

Hi Eusebiu, that was an *excellent* answer and will work for other people too if they search for information.

I will go with EXE installers.

Thank you!
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Why use pre-install vs feature-based prerequisite for NET 6 desktop runtime

You are always welcome!

Glad we could assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

Re: Why use pre-install vs feature-based prerequisite for NET 6 desktop runtime

Just a follow-up to my earlier statement that I was going to use EXE installers.

I tried them and had FOUR dialogs that flickered up before the main Welcome dialog. Ugh!

I switched back immediately to MSI installers once I figured out that MSI installers could install feature-based prerequisites just fine, and that MSI installers could also use the fancy dialog colors. And I only have one flickering dialog ("Preparing ..." I think, from Windows). I disabled the AI PrepareDlg by setting its execution value to 0.

Who knows, the -minuseractions argument might also be playing a role, but it didn't help at all with the EXE installer.

MSI installers look like the way to go, if they meet your installation technical requirements.
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Why use pre-install vs feature-based prerequisite for NET 6 desktop runtime

Thank you for your followup on this!

Indeed, the EXE installer is used mostly for capabilities that are not supported by the Windows Installer technology (MSI) such as pre install prerequisites, more up to date (modern) themes, etc.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kkkwj
Posts: 88
Joined: Thu Mar 01, 2007 10:45 pm

Re: Why use pre-install vs feature-based prerequisite for NET 6 desktop runtime

Hi Catalin, I am not sure what you mean by more modern themes for EXE installers. I found out that even with MSI installers I can choose from a huge list of fancy themes and colors. (I used to think I was limited to a dozen or so, but as far as I can see, I can use anything from the big list.)
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Why use pre-install vs feature-based prerequisite for NET 6 desktop runtime

Hello,

Except "Classic" themes, all the others require the Enhanced User Interface in order to be correctly rendered. The EUI further requires the EXE setup, as it can not be handled by the MSI.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”