I am trying to install package programatically. And i need to create the Package manager instance. It's throwing E_ACESSDENIED!
Windows.Management.Deployment.PackageManager packageManager = new Windows.Management.Deployment.PackageManager();
Exception:
System.UnauthorizedAccessException: 'Access is denied. (Exception from
HRESULT: 0x80070005 (E_ACCESSDENIED))'
I am in the administrative account. What's wrong with this API?