如何将参数传递给入口点为“的UWP应用程序”;Windows.FullTrustApplication“;在AppxManifest.xml中
我正在尝试设置一个如何将参数传递给入口点为“的UWP应用程序”;Windows.FullTrustApplication“;在AppxManifest.xml中,windows,visual-studio,uwp,appxmanifest,Windows,Visual Studio,Uwp,Appxmanifest,我正在尝试设置一个AppxManifest.xml,以将Win32应用程序作为完全信任应用程序启动。使用下面的代码段,我能够添加AppxPackage-注册AppxManifest.xml,然后使用调试>其他调试工具>调试安装的应用程序在Visual Studio 2017中调试应用程序 但是,我想在启动应用程序时向它传递一些参数。我怎样才能完成这个?我不介意在AppxManifest.xml中列出它们,如果这是最简单的,我只需要知道如何操作 ... <Applications>
AppxManifest.xml
,以将Win32应用程序作为完全信任应用程序启动。使用下面的代码段,我能够添加AppxPackage-注册AppxManifest.xml
,然后使用调试>其他调试工具>调试安装的应用程序
在Visual Studio 2017中调试应用程序
但是,我想在启动应用程序时向它传递一些参数。我怎样才能完成这个?我不介意在AppxManifest.xml中列出它们,如果这是最简单的,我只需要知道如何操作
...
<Applications>
<Application Id="App" Executable="SomeExecutable.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="Wrap" Description="Wrap" BackgroundColor="transparent" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
</uap:VisualElements>
</Application>
</Applications>
...
。。。
...
是您想要的:
协议关联可以启用其他程序和系统组件
与打包的应用程序进行互操作。当您的打包应用程序
是通过使用协议启动的,您可以为
传递给它的激活事件参数,以便它可以相应地进行操作。
仅打包的完全信任应用程序支持参数
<Package
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
IgnorableNamespaces="uap3, desktop">
<Applications>
<Application>
<Extensions>
<uap3:Extension
Category="windows.protocol">
<uap3:Protocol
Name="myapp-cmd"
Parameters="/p " />
</uap3:Extension>
</Extensions>
</Application>
</Applications>
</Package>