Failed to install UWP application

0

I need help with the scenario below

I have a UWP application that is being installed from a service run by the local system user (user SID S-1-5-18) The service executes the following command in powershell:

Add-AppPackage -Path "C:\Dir1\Dir2\Dir3\Windows\App.UWP_2.0.27.0_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, in this process the error is presented:

The AppX Deployment operation for CodeWith7-CodeWith4-CodeWith4-CodeWith4-CodeWith12_2.0.27.0_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_2.0.27.0_neutral ~ _3kncj78a7wnxj package: App.UWP_2.0.27.0_x64.msixbundle installation request because the account of the Local System is not allowed to perform this operation.

I have already done the test and if I change the execution of the service to be performed by a local administrator user the installation is performed. But when run with the local system user it has an error.

I would like to know if anyone knows how to explain to me why I need to be run as an administrator and not by the local system. And if someone chooses to perform in another way to be able to perform the installation with that user.

Note: The application certificate has been added to \ LocalMachine \ Root
Note 2: When I execute the command related to the installation Get-AppPackageLog -ActivityID 6a5bae53-546e-0000-2509-99d42d22d701 the return presented is:

Add deployment operation initiated in a package with the main parameter file:///C:/Dir1/Dir2/Dir3/Windows/App.UWP_2.0.27.0_x64.msix bundle and dependency parameters file:///C:/Dir1/Dir2/Dir3/Windows/Dependencies/x64/Dependencies/x64/Microsoft.NET.Native.Framework.2.2.appx, file:///C:/Dir1/Dir2/Dir3/Windows/Dependencies/x64/Microsoft.NET.Native. Runtime.2.2.appx, file:///C:/Dir1/Dir2/Dir3/Windows/Dependencies/x64/Microsoft.UI.Xaml.2.4.appx, file:///C:/Dir1/Dir2/Dir3/Windows/Dependencies/x64/Microsoft.VCLibs.x64.14.00.appx and Options 0 and 0. See http://go.microsoft.com/fwlink/?LinkId = 235160 for help diagnosing application deployment issues. The application batch signature has been validated for the main content of the application batch published by CN = APP STORE, O = APP Corporation, C = US. No application packages will be validated until they are read. The batch streaming reader was successfully created for the CodeWith7-CodeWith4-CodeWith4-CodeWith4-CodeWith12_2.0.27.0_neutral_~3kncj78a7wnxj batch. The application package signature has been validated for the core content of the application package published by CN = Microsoft Corporation, O = Microsoft Corporation, L = Redmond, S = Washington, C = US. The payload will not be validated until the files are read. The streaming player was successfully created for the Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe application package. The application package signature has been validated for the core content of the application package published by CN = Microsoft Corporation, O = Microsoft Corporation, L = Redmond, S = Washington, C = US. The payload will not be validated until the files are read. The streaming player was successfully created for the Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe application package. The application package signature has been validated for the core content of the application package published by CN = Microsoft Corporation, O = Microsoft Corporation, L = Redmond, S = Washington, C = US. The payload will not be validated until the files are read. Application manifest validation warning: the declared http://schemas.microsoft.com/developer/appx/2015/build namespace is inapplicable and will be ignored during the processing of the manifest. The streaming player was successfully created for the Microsoft.UI.Xaml.2.4_2.42005.18002.0_x64__8wekyb3d8bbwe application package. The application package signature has been validated for the core content of the application package published by CN = Microsoft Corporation, O = Microsoft Corporation, L = Redmond, S = Washington, C = US. The payload will not be validated until the files are read. Application manifest validation warning: the declared http://schemas.microsoft.com/developer/appx/2015/build namespace is inapplicable and will be ignored during the processing of the manifest. The streaming player was successfully created for the Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe application package. Creating Resilience File C: \ ProgramData \ Microsoft
Windows \ AppRepository
8696f38b-b1e3-460d-ae45-5f0cdf55e712_S-1-5-18_1.rslc for the Add Operation in the CodeWith7-CodeWith4-CodeWith4-CodeWith4-CodeWith12_2.07 Package. 0_neutral
~ 3kncj78a7wnxj. The Add deployment operation in the CodeWith7-CodeWith4-CodeWith4-CodeWith4-CodeWith12_2.0.27.0_neutral~3kncj78a7wnxj package has been removed from the queue and is running for user SID 1-5-18. Add deployment operation rejected in CodeWith7-CodeWith4-CodeWith4-CodeWith4-CodeWith12_2.0.27.0_neutral~3kncj78a7wnxj package from: installation request App.UWP_2.0.27.0_x64.msixbundle because the Local System account is not allowed to perform this operation. The last successful state reached was SharedAppsRedirect. A failure occurred before reaching the next OptionalDependenciesHandled state. hr: 0x80070057 Add operation failed with target volume C: in the CodeWith7-CodeWith4-CodeWith4-CodeWith4-CodeWith12_2.0.27.0_neutral~3kncj78a7wnxj de: (App.UWP_2.0.27.0_x64.msixbundle) error 0x80070057. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing application deployment issues. The AppX Deployment operation for CodeWith7-CodeWith4-CodeWith4-CodeWith4-CodeWith12_2.0.27.0_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_2.0.27.0_neutral~_3kncj78a7wnxj package: App.UWP_2.0.27.0_x64.msixbundle installation request because the account of the Local System is not allowed to perform this operation.

Note 3: The machine where the application is being installed has the following characteristics:

  • Edition: Windows 10 Pro Version: 20H2 OS Build: 19042.867 Developer mode is active on the machine

For developer

About

c#
windows
uwp
win-universal-app
xamarin.uwp
asked on Stack Overflow Mar 29, 2021 by mribeiro • edited Apr 1, 2021 by mribeiro

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0