tdegw
Posts: 2
Joined: Mon Feb 28, 2022 9:33 pm

Installer for UWP app

Mon Feb 28, 2022 9:45 pm

Can AdvancedInstaller be used to create a traditional setup.msi file to install a UWP app?

I understand that you can create a UWP installer to get an app on the microsoft store, but that is not what I want here.
I know you can side load a UWP app but that is inconvenient for customers esp. wrt certificates and things.

I want to provide my UWP app on my website instead and not go through Microsoft Store and install with a simple setup package.

The app is developed as a C# UWP app.

I downloaded the free trial of AI, created a project using its wizard.
The installer installs 'something' but when I try to run the program I get errors saying the following are not found:

mrt100_app.dll
SharedLibrary.dll

Is this even possible?

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

Re: Installer for UWP app

Tue Mar 01, 2022 2:21 pm

Hello Gareth and welcome to our forums,

Unfortunately, I'm afraid it might not be possible to create an MSI/EXE package for your UWP app, as explained in the following StackOverflow thread:

How to create .exe/.msi for uwp application

The rest is exactly as you mentioned. Basically, for an UWP app, you need to create an APPX/MSIX package. More details about MSIX in the following article:

MSIX - Biggest Update for Windows Installer
MSIX is a complete containerization solution which inherits all the great features in UWP and most importantly, it applies to all Win32, WPF, Windows Forms, and UWP applications.
As you have mentioned, an MSIX package can only be installed from the Microsoft Store or sideloaded (if the option is enabled on the customer's machine).

A workaround for this limitation could be:

- creating a functional MSIX package for your UWP app

- creating a new project in which you add the MSIX package

- install it through our "Install MSIX" custom action

Basically, we create an empty MSI/EXE package that will install the MSIX package.

Hope this helps!

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

tdegw
Posts: 2
Joined: Mon Feb 28, 2022 9:33 pm

Re: Installer for UWP app

Wed Mar 02, 2022 5:55 pm

Thank you for getting back to me.
I think I understand what you mean but I am getting stuck when running the msi on another machine.

Progress so far:
So I got visual studio to output an msix package.
In AI I created an msi/exe installer and added a custom action to install the msix.
I then built the AI installer.
And ran the .exe that was created.
It installed perfectly! and the app ran as expected.

However trying this same thing on a new machine the installer failed.

I used the log option /L*V and it seems it is attempting to install the msix (that should be contained in it?) from the hard drive location on the machine on which I built the AI installer.
Rather than using an msix that should be embedded in the .exe?

*confused*

What am I doing wrong?

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

Re: Installer for UWP app

Thu Mar 03, 2022 12:57 pm

Hello,

Well, that is indeed a strange behavior.

The MSIX file should simply be copied on the disk (location depends on where you added it in the "Files and Folders" page) and then the custom action should launch it.

Please make sure you did not give a hardcoded path to the MSIX file in your "Install MSIX" custom action.

For instance, if you add the MSIX package in the "Files and Folders" page --> "Application Folder", then when creating the "Install MSIX" custom action, in the "Path" field, simply type "[" and select "File..." - this should allow you to pick the MSIX file.

Hope this helps!

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

Return to “Building Installers”