Home > Back-end >  MSIX Installer and dependencies
MSIX Installer and dependencies

Time:10-14

I have a Windows App SDK based desktop application. I am using the single-project MSIX packaging in VS2022. What I need to figure out is how to get the installer to launch 3rd party installers (Nvidia Cuda for instance) as part of the application install. What should be pretty straight forward is lost in the weeds in the sparse documentation on MSIX. I also will eventually want to overlay multiple MSIX installs in one location. I am pretty sure I can't do this directly from Visual Studio but it seems possible using the MSIX Tool. Any pointers would be helpful.

CodePudding user response:

While MSIX doesn't have install custom actions, for some things we can still customize some things at the user system.

Handling this externally from the package deployment is the recommended method. There may be other options, however.

With source code you can modify the app to detect if you need to do something and do it. If "it" needs elevation you need to add the allowelevationcapability in the manifest and there will be a UAC prompt for the user.

With or without source you can instead add the PsfLauncher of the Package support framework to run a script on launch of the app. PsfLauncher will take care of the detection on if run before for you. And the same elevation concerns apply.

As these methods run in the user context they really aren't any good if elevation is needed, hence not the recommended way.

Tim Mangan.

CodePudding user response:

First of all, don't start using the MSIX Packaging Tool. As I said in previous SO threads, that tool is designed for IT pros, not for developers.

Second, as Tim concluded, I wouldn't recommend overcomplicating yourself to deliver those third-party installers via MSIX.

Instead of overcomplicating yourself with integrating the Package Support Framework into your MSIX package, I would think twice if it is worth deploying the application as MSIX. Last time I checked you could still get an identity for your app even if you deployed it with an MSI (I may be wrong here).

If you choose to keep the MSIX for your app, maybe a cleaner solution is to build an EXE wrapper (also called bootstrapper in the packaging world) over it to handle the third-party package installations, and when done with those it can launch your MSIX installation?

Unfortunately, so far Microsoft isn't making it easy for us to define a non-MSIX dependency.

  • Related