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

Convert MSIX to MSI using SaveAs

Wed Nov 09, 2022 6:26 pm

I built a simple MSIX installer that just installs files into the ProgramFiles folder on Windows desktop - no registry, no AppData, no fancy stuff at all.

Now I want to make an MSI installer. It's not a lot of work because I have the files and folders already organized. But it seemed to me that I should be able to save my current MSIX project using a 'SaveAs ... MSI' menu choice. But there is no such choice.

I could be wrong, but haven't I already defined everything that AI needs (icons, files, etc) to generate a simple MSI file from a working MSIX project file? Is it not possible to do what I am imagining?

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: Convert MSIX to MSI using SaveAs

Thu Nov 10, 2022 2:57 pm

Hello,

Please note that the "Save As" option is used to save your project (.AIP file) with a new name.

It has nothing to do with the output of your project (MSI or MSIX).
I could be wrong, but haven't I already defined everything that AI needs (icons, files, etc) to generate a simple MSI file from a working MSIX project file? Is it not possible to do what I am imagining?
What you could try to do here is add another build of "MSI" type in the "Builds" page. This way, an MSI should also be created when you build your project using the same files.

Hope this helps!

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: Convert MSIX to MSI using SaveAs

Fri Nov 11, 2022 7:35 am

Wow! Catalin, thank you for your answer - you expanded my horizons again about AI. I always thought "one .aip project = one msi or msix or exe output file." But now I see that I can have many different build outputs from one project. (I thought I read the entire AI manual years ago, but I don't remember this flexibility. Excellent!)

I think I understand the difference and applications of MSI vs MSIX. But I'm not as clear on when I should use MSI vs an EXE build file. Is there a simple way of understanding when to use one or the other? Users double-click on both types to do an install. Thank you.

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: Convert MSIX to MSI using SaveAs

Fri Nov 11, 2022 4:05 pm

You are always welcome!
But I'm not as clear on when I should use MSI vs an EXE build file. Is there a simple way of understanding when to use one or the other? Users double-click on both types to do an install. Thank you.
Our EXE is simply a bootstrapper for the MSI. Behind the courtains our EXE will still launch the MSI file.

This is useful, for instance, if you want to use pre-install prerequisites. These prerequisites are handled before the installation of the MSI and therefore it would be impossible for the MSI to handle it and therefore our EXE boostrapper handles that, e.g.:

- first launches the pre-install prerequisite

- the launches the main MSI

Another scenario would be if you want to use some advanced themes (such as Surface). Windows Installer is a really old technology that does not allow rendering such new themes. Our EXE boostrapper handles that.

EXE Bootstrapper for Windows Installer MSI

Hope this helps!

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: Convert MSIX to MSI using SaveAs

Sat Nov 12, 2022 12:17 am

Wow, another superb answer! Thank you! (You must have been doing this for many years. When I meet a company or a person like you, I think to myself, "Boy, I sure would not want to compete with these guys..." :-) My compliments again.

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

Re: Convert MSIX to MSI using SaveAs

Sun Nov 13, 2022 6:40 am

I did as you suggested and added an MSI build to my previous MSIX package. It worked!

But the MSI package decided to install in ProgramFiles(x86), not Program Files, as I expected. As far as I know, my C# NET 6 code should be 64-bit. I added a prerequisite for the x64 NET 6.0 runtime and did not check the x86 prerequisite.

My understanding must be wrong somewhere because I believe AI is smarter than I am. :-) Could you please explain what is going on, and if I should be concerned about the ProgramFilesx86 installation location? Thank you.

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: Convert MSIX to MSI using SaveAs

Mon Nov 14, 2022 11:47 am

Hello,

First of all, tahnk you for your kind words!

Regarding your new question, that happens most likely because your package type (in "Install Prameters" page) is set to "32-bit".

And when you install a 32-bit setup on a 64-bit machine, Windows will automatically redirect the resources under the "Program Files x86" folder.

The same thing will happen to registry entries as well, they will be redirected under WOW6432Node.

You can read more about this in the following article:

File System Redirector

Basically, to put it short, it's a way in which the OS separates the 32-bit and 64-bit applications.

If you would like the files to be installed under "Program Files" folder, you can change the "Package Type" to "64-bit package for x64 processors (AMD64, EM64T)"

Hope this helps! :)

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: Convert MSIX to MSI using SaveAs

Wed Nov 16, 2022 5:42 pm

Hi Catalin, thank you for your answer. As usual, you were right. It took me a while to find the issue, because I have multiple builds (MSIX, MSI) in one project. It turns out there is a tiny little (3/4 inch) 3-line drop down box in the top left of my 27-inch monitor that specifies which build to work on. I kept seeing everything 64 bit because the little box was set to MSIX. Instead, I was looking at the MSIX/MSI builds in the tree widget in the main panel under the Builds section. I thought by selecting MSI there, the whole UI would shift to the MSI build. But not so.

After I spotted the tiny little box and changed it to MSI, then your comment applied and I could see where 32 bit was selected.

Do you have a recommendation for 32 or 64 bit? Most of my NET 6 apps do not work with large data sets. But I expect them all to be running on 64 bit Windows machines. I will happily aim for "64 bit package for x64 bit machines" if you give the approval. I compile and publish them to run on the NET 6 win64 runtime.

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: Convert MSIX to MSI using SaveAs

Thu Nov 17, 2022 4:52 pm

Hello,

You are always welcome! :)

Glad you managed to find how to set the 64-bit option for your build.
Do you have a recommendation for 32 or 64 bit? Most of my NET 6 apps do not work with large data sets. But I expect them all to be running on 64 bit Windows machines. I will happily aim for "64 bit package for x64 bit machines" if you give the approval. I compile and publish them to run on the NET 6 win64 runtime.
Not quite. If you are expecting to run only on 64-bit machines, then for sure you can set the package type to "64-bit". The only issue here would be that your clients will not be able to install the setup on a 32-bit machine.

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: Convert MSIX to MSI using SaveAs

Thu Nov 17, 2022 6:38 pm

Hi Catalin, thank you again. It's no problem not installing on a 32-bit machine - I think Windows machines have been 64 bit for many years already. When I get there, if clients protest, I can always generate a 32-bit package installer for them.

Just to be clear, does "32 bit package" refer to the installer code/runtime, or to my app inside the package? Can I put a 64 bit app inside a 32 bit package installer?

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: Convert MSIX to MSI using SaveAs

Fri Nov 18, 2022 10:58 am

You are always welcome!
It's no problem not installing on a 32-bit machine - I think Windows machines have been 64 bit for many years already. When I get there, if clients protest, I can always generate a 32-bit package installer for them.
You are indeed right. The time of most machines being 32-bit is long gone.
Just to be clear, does "32 bit package" refer to the installer code/runtime, or to my app inside the package? Can I put a 64 bit app inside a 32 bit package installer?
It refers to the installer itself and how it places its resources on the target machine, it has nothing to do with your applicaiton. You can put a 64-bit app in a 32-bit installer, but it doesn't make much sense to be honest.

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: Convert MSIX to MSI using SaveAs

Fri Nov 18, 2022 8:46 pm

Thank you again for your wisdom!

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

Re: Convert MSIX to MSI using SaveAs

Sun Nov 20, 2022 10:05 pm

Hi Catalin, I reread this whole thread again and thought about how useful a simple flowchart would be for choosing the best (or best combo) of installer packages. Something like:

Need to install in a container? Use MSIX, and accept the limitations - no easy c:/ProgramFiles/YourApp.exe for other programs to call to launch your app; no access to files in the application install dir; no installation operations; app must configure itself on first boot to put files in the Documents/Your/App folder.

Want to force the installation of prerequisites like NET 6 before the installation operation? Use an EXE bootstrapper - it installs the prerequisites, and then calls the underlying MSI installer.

Want to install from the web ...

And so on.

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: Convert MSIX to MSI using SaveAs

Mon Nov 21, 2022 7:59 am

You are always welcome!

Regarding your request, we already have something similar to this:

MSI vs MSIX: Practical Side-by-Side Comparison and Limitations

Hope that helps!

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: Convert MSIX to MSI using SaveAs

Mon Nov 21, 2022 3:00 pm

Thank you for your response. I did already see that table - but it is a table of attributes, not an algorithm and flowchart that will ask developers the key questions they need to answer to pick an installer method. In my own case, as I worked through the different kinds of installers, I ended up with the most important questions of all - use a web installer or not? use an exe bootstrapper or not?

I will figure out an installer-selection algo myself so that I can identify the key questions to ask myself before investing time and effort. Probably I will run into issues that inject new knowledge/conditions into my algo. But that's the story of development! 2 steps forward and 1 step back!

As I write I wonder if it is meaningful to ask the question "What type of installer do most small solopreneurs end up using?"

Return to “Building Installers”