1

I have an application packaged and signed as an MSIX, it installs and runs from the start menu. I'd like to be able to run the application from the command line too, for automated testing, but I can't see a way to do it. From powershell the docs suggest Invoke-CommandInsideDesktopPackage, but that requires developer mode which I'd rather not enable on test machines, and also is not the same as just running the app. What I'd love is a simple command line command that starts the app in the same way that the start menu does it.

Damon Smith
  • 1,770
  • 18
  • 24

1 Answers1

3

By design, the binaries from an installation folder of an MSIX folder are not directly accessible through their direct path.

The correct way to run an app from the command line from an MSIX package is with the use of an execution alias. The following article contains more details about how an execution alias works and how you can define it in your package, no matter the tool you use to build the MSIX package.

- App Execution Alias

Also, here is a related question on SO.

Bogdan Mitrache
  • 10,536
  • 19
  • 34
  • thanks, it's a handy article, the only problem is it assumes you're using advanced installer which I'm not, and it only gives an xml snippet to include in an AppxManifest.xml but doesn't specify what the xml namespace uap5 maps to. – Damon Smith Mar 22 '21 at 21:48
  • The XML sample practically shows how to do the same change directly in your package manifest, no matter what tool you are using to build your package, so using Advanced Installer is optional. Here are the MSFT docs on the full package manifest schema, https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/appx-package-manifest If you still can't get it done using these docs. You could build a test package with a trial version of Advanced Installer, then use 7-zip to extract the package manifest and see exactly what is missing from your manually created manifest. – Bogdan Mitrache Mar 23 '21 at 07:30