The PackageManager class is only usable from full desktop apps - it's usage directly from WinRT app (even to get a list of apps installed for current user) results in UnauthorizedAccessException
.
I was hoping that with new Brokered Components introduced by Microsoft in Windows 8.1 Update 1 it would be possible to circumvent this and actually use the class (right now, it's only possible to use it directly from desktop applications).
To my surprise, it didn't work and I simply got the dreaded UnauthorizedAccessException
again. I thought the brokered compoment is supposed to run in a separate process outside of any App Container and therefore, I shouldn't be facing any limitations. I even tried to execute a console app to take care of my PackageManager
needs from the brokered component as a separate process, but this, too, failed with the same exception.
I can't think of a way to provide you with a simple code reproducing the exception - to create a brokered component and use it from the WinRT app, I followed the series about brokered components from Harry Pierson.
Could someone comment on why is this happening?