Anomalies when installing MSIX via PowerShell (Add-AppxPackage)

bk42114ss 1 Reputation point
2024-08-29T14:35:42.7833333+00:00

One of our customers uses Windows Enterprise 22H2 (though older Versions display the same behaviour) for some managed devices and wants to deploy our app, signed by a developement certificate to allow distribution via MSIX and PowerShell (the app is build using the Windows App SDK and WinUI 3 in case that should matter).

Multiple other customers with similar environments never had any issues with this porcess, but there seems to be something wrong which we couldn't troubleshoot despite our best efforts. Installing the app through different means repectively shows a number of oddities:

If the app is installed through the App Installer:

  • The Folder at C:\Program Files\WindowsApps will not be removed upon uninstalling, leaving a dead directory;
  • Everything else appears as expected and the app works.

If the app is installed through PowerShell:

  • The app does not show up shell:AppsFolder, the Start Menu or Apps & Features;
  • The %appdata%/Local directory belonging to the app is not created;
  • The app is however listed when executing Get-AppxPackage, with the following entry:
    Name              : AppName
    Publisher         : CN=OurSigningAuthority
    Architecture      : X64
    ResourceId        : 
    Version           : 1.3.5.0
    PackageFullName   : AppName_1.3.5.0_x64__Signature
    InstallLocation   : C:\Program Files\WindowsApps\AppName_1.3.5.0_x64__Signature
    IsFramework       : False
    PackageFamilyName : AppName_Signature
    PublisherId       : Signature
    IsResourcePackage : False
    IsBundle          : False
    IsDevelopmentMode : False
    NonRemovable      : False
    IsPartiallyStaged : False
    SignatureKind     : Developer
    Status            : Ok

  • The lacking user directory makes the app unusable here.

At this point we are really struggling finding a solution here and I would appreciate any help.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,592 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.