简体   繁体   中英

How to check if user has admin rights in Windows Store App

I would like to check if current user has administrator rights. I suppose that System.Security.Principal.IIdentity and System.Security.Principal.IPrincipal would be useful, but I have no idea how to implements these interfaces. Please, help me.

Windows Store apps by design run at base trust, never elevated. Any WinRT API that requires full trust has to be called from an elevated desktop app. Accordingly, your question is somewhat moot, as you'll not be able to do anything differently even if you could determine the admin rights.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM