如何创建一个完全信任的 UWP 应用程序? [英] How to Create a Full-Trust UWP App?

查看:24
本文介绍了如何创建一个完全信任的 UWP 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过 DAC 使用 Desktop Bridge(以前称为 Project Centennial),可以创建完全信任的 UWP 应用.我认为这意味着你现在可以创建一个完全信任的 UWP 应用程序,如果是这样,你该怎么做?

Using the Desktop Bridge (formerly known as Project Centennial) through the DAC, one can create a full-trust UWP App. I thought this meant you can now create a Full-Trust UWP App and if so, how do you do that?

我想弄清楚的是我可以在我的 UWP 项目上手动设置什么配置来授予它完全信任.

What I am trying to figure out is what configuration can I manually set on my UWP Project to grant it full-trust.

如果您需要一些背景知识,我需要创建一个必须是 UWP 的 Enterprise 工具.该应用程序将在我的公司上运行,使 UX 更好的功能之一是能够访问文件系统的某些部分,而不是 UWP 允许的部分,并且最好不调用对话框.能够运行其他 DLL 也是一大优势;或许这一次需要 DLL Hell.

If you need some background, I need to create an Enterprise tool that has to be UWP. The application is going to be run on my company and one of the features that would make the UX better is to be able to access some parts of the file system outside of those allowed by UWP and preferably without the summoning of a dialog. Being able to run other DLL would also be a big plus; perhaps DLL Hell is desired this time around.

推荐答案

我不知道这样的选项.是的,DAC 可以包含 Full-Trusted Win32 应用程序,但它仅适用于 Win32.UWP - WinRT - 应用受应用容器限制.

I don't know such of options. Yes, DAC can contain the Full-Trusted Win32 apps, but it is only applicable for Win32. UWP - WinRT - apps are restricted with App Container.

另一种选择是 - 使用特殊功能".

The alternative option is - using the "Special capabilities".

特殊和受限功能

有许多声明可以克服沙盒的限制.其中一些不适用于商店提交 - 仅适用于内部部署应用程序.其他人需要注册 Microsoft 才能在商店中部署.如果您的要求符合,您可以使用它.

There are many of declarations that overcome the restrictions of sandbox. Some of these are not applicable for store submission - only for in-house deployment apps. Others need registration for Microsoft to deploy with store. If your requirement is matched, you can use it.

(添加 - 2017 年 6 月)从 Win10 AU,我们可以使用FullTrustLauncher"API 从 UWP App 启动 Win32 组件.但是,是的,这并不意味着我们可以以完全信任的权限运行UWP"-WinRT 进程.它仅适用于 Win32 进程.而且,Win32 应用程序可执行文件应包含在应用程序的 AppX 包中,清单应将可执行文件声明为windows.fullTrustProcess".

(Added - June 2017) From Win10 AU, we can use the "FullTrustLauncher" API to launch the Win32 component from UWP App. But, yes, it does not mean we can run the "UWP" - WinRT process with full-trust rights. It's applicable only for Win32 process. And, the Win32 app executable should be contained in the application's AppX package and the manifest should declare the executable as "windows.fullTrustProcess".

  <Extensions> 
    <desktop:Extension Category="windows.fullTrustProcess" Executable="fulltrustprocess.exe"> 
      <desktop:FullTrustProcess> 
        <desktop:ParameterGroup GroupId="SyncGroup" Parameters="/Sync"/> 
        <desktop:ParameterGroup GroupId="OtherGroup" Parameters="/Other"/> 
      </desktop:FullTrustProcess> 
    </desktop:Extension> 
  </Extensions> 

全信任流程启动器类

这篇关于如何创建一个完全信任的 UWP 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆