Page 1 of 1

[SOLVED] pb install calculator via powershell

Published: March 5, 2020 - 1:08 PM
by cdeze
Good morning,
I'm trying to run a PowerShell command to reinstall the calculator on Windows 10.
But Windows doesn't like this command being passed as the SYSTEM LOCAL user

Code: Select all

def install():
    print('installing ddt72-reinstall-calculator')
    #run('wsreset')
    run_powershell('get-appxpackage *Microsoft.WindowsCalculator* | remove-appxpackage',output_format='Text')
    run_powershell('Add-AppxPackage -register "C:\Program Files\WindowsApps\*WindowsCalculator*\AppxManifest.xml" –DisableDevelopmentMode',output_format='Text')

Code: Select all

Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF9, Install failed.
Please contact your software vendor. (Exception from HRESULT: 0x80073CF9)
Deployment Register operation rejected on package
............ from: AppXManifest.xml
install request because the Local System account is not allowed to perform
this operation.
Do you have any idea?

Re: pb install calculator via powershell

Published: March 10, 2020 - 09:24
by jpele
Hello,

Wappx applications are installed in the default user environment. I suggest you try the "-AllUsers" option.

Regards,
Jimmy

Re: [SOLVED] pb install calculator via powershell

Published: March 12, 2020 - 3:11 PM
by cdeze
Hello,
the problem stems from the user used by the WAPT service: SYSTEM LOCAL.
The Add-AppxPackage command doesn't like this user!
Does anyone have a solution?
Thanks

Re: [SOLVED] pb install calculator via powershell

Published: March 12, 2020 - 4:28 PM
by jpele
Hello,

have you tested the "-AllUsers" option? Can you show me the return code?