Apr 12 2021 05:54 AM
Apr 12 2021 05:54 AM
I have a service that performs some processes and can even be run installation commands. This service is performed by the local system user (SID S-1-5-18).
So I sent the command below for the service to run, which it runs using powerShell as the local system
Add-AppxPackage -Path "C:\Dir1\Dir2\Dir3\Windows\App.UWP_220.127.116.11_x64.msixbundle" -DependencyPath "C:\Dir1\Dir2\Dir3\Windows\Dependencies\x64\Microsoft.NET.Native.Framework.2.2.appx", "C:\Dir1\Dir2\Dir3\Windows\Dependencies\x64\Microsoft.NET.Native.Runtime.2.2.appx", "C:\Dir1\Dir2\Dir3\Windows\Dependencies\x64\Microsoft.UI.Xaml.2.4.appx", "C:\Dir1\Dir2\Dir3\Windows\Dependencies\x64\Microsoft.VCLibs.x64.14.00.appx"
However when trying to run, I get the error:
The AppX Deployment operation for CodeWith7-CodeWith4-CodeWith4-CodeWith4-CodeWith12_18.104.22.168_neutral_ ~ 3kncj78a7wnxj failed with error 0x80073CF9. The specific error text for this failure is: Add deployment operation rejected in the CodeWith7-CodeWith4-CodeWith4-CodeWith4-CodeWith12_22.214.171.124_neutral ~ _3kncj78a7wnxj package: App.UWP_126.96.36.199_x64.msixbundle installation request because the account of the Local System is not allowed to perform this operation.
When I change the service manually so that it runs using a local administrator user, the command runs without any error. I have a business need to run this command as a local system. Does anyone know how I can do this?
Or, does anyone know how to explain to me WHAT is done in the process that requires an ADM user?
Oct 25 2021 08:15 PM
@maysaribeiro I'm pretty sure it's because Add-AppxPackage installs the application into the profile of the account running the command, and Local System does not have a regular user profile.
My organization needed to apply updates for Windows Store Appx applications, and we do not have a Windows Store. Instead, I used MECM to stage the files on my org's computers, then ran PSExec with an administrator account to start a PS script that installs the updates.
I've been meaning to look into using Add-AppxProvisionedPackage instead, but haven't had the time.
If you have any additional information, I'd be glad to hear it.