I am trying to install an UWP App on win10. I want to automate the whole installing Process(install Certificate, Dependencies etc...)
So I Worte a little batch file that calls 2 Powershell scripts. One installs the dependencies(checks if they're already installed). The other one installs the Certificate and Adds the App to the system.
I am adding the Certificate to:
certutil -Enterprise -addstore "TrustedPublisher" .\cert.crt
certutil -Enterprise -addstore "Root" .\cert.crt
Import-Certificate -CertStoreLocation Cert:\LocalMachine\TrustedPublisher -FilePath .\cert.crt
Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root -FilePath .\cert.crt
Add-AppxPackage -Path .\app.appxbundle
Now the Thing is that my client wants me to do that with no Admin Rights.
Therefore I thought installing the for the CurrentUser instead would work, as installing ther cert there doesn't need Admin rights.
So I changed my Script like this
certutil -addstore -user -f "TrustedPublisher" .\cert.crt
certutil -addstore -user -f "Root" .\cert.crt
Import-Certificate -CertStoreLocation Cert:\CurrentUser\TrustedPublisher -FilePath .\cert.crt
Import-Certificate -CertStoreLocation Cert:\CurrentUser\Root -FilePath .\cert.crt
Add-AppxPackage -Path .\app.appxbundle
Also tried to add to "TrustedPeople" and "My" locations.
Installing the Certificate with no Admin rights worked fine. But installing the App itself failed with the Error.
"Add-AppxPackage : Deployment failed with HRESULT: 0x800B0109, A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider"
So the Certificate was kinda found but its not trusted. So my questions are:
I am new to the whole Deployment stuff on Windows, so I hope those Questions make sense :)
User contributions licensed under CC BY-SA 3.0