众所周知,UWP 是运行在沙盒里面的,所有权限都有严格限制,和沙盒外交互也需要特殊的通道,所以从根本杜绝了 UWP 毒瘤的存在。但是实际上 UWP 只是一个应用模型,本身是没有什么权限管理的,权限管理全靠 App Container 沙盒控制,如果我们脱离了这个沙盒,UWP 就会放飞自我了。那么有没有这种可能呢? 我们打开设置应用,通过任务管理器查看进程,就会发现它并没有 Runtime Broker 存在,这个进程是用来在沙盒间代理的,这说明微软给 UWP 开了一个后门。 那么我们是不是也有办法脱离沙盒运行呢? Ahmed Walid 在 2023年2月 发表了这样一个 帖子 : 同时他还提交了一个名为 Added a remark about uap10:TrustLevel 的 PR,在这个 PR 中明确提到了如何通过设置 Custom Capability 来修改 UWP 的 TrustLevel Setting uap10:TrustLevel="mediumIL" while uap10:RuntimeBehavior="windowsApp" requires the Microsoft.coreAppActivation_8wekyb3d8bbwe Custom Capability. This is also true if uap10:TrustLevel="mediumIL" and EntryPoint is any other value than "windows.fullTrustApplication" or "windows.partialTrustApplication" . You can read more about this custom capability here in Custom Capabilities . 如今这个 PR 已经合并,现在可以直接在微软文档 《应用程序 (Windows 10)》 中找到了 根据文档描述,我们需要添加一个名为 Microsoft.coreAppActivation...