2017-11-06 3 views
0

FullTrustProcessLauncher을 사용하는 UWP 응용 프로그램에서 powershell (모든 사용자가 수행 할 수있는 일부 경량 명령) 명령을 실행하려고합니다.UWP 및 FullTrustProcessLauncher가 누락되었습니다.

문제 현재이 컨텍스트에는이 이름이 존재하지 않습니다. 내가 좋아하는 외모에서 호출하는 것을 시도하고있다

<?xml version="1.0" encoding="utf-8"?> 

<Package 
    xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" 
    xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" 
    xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" 

    xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" 
    xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" 

    IgnorableNamespaces="uap mp"> 

<Dependencies> 
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> 
</Dependencies> 

<Resources> 
    <Resource Language="x-generate"/> 
</Resources> 

<Applications> 
    <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="PrototypeProject.App"> 

    <Extensions> 
     <desktop:Extension Category="windows.fullTrustProcess" Executable="powershell.exe"> 
     <desktop:FullTrustProcess> 
     <desktop:ParameterGroup GroupId="TestGroup" Parameters="ls"/> 
     </desktop:FullTrustProcess> 
    </desktop:Extension> 
    </Extensions> 

    </Application> 
</Applications> 

<Capabilities> 
    <Capability Name="internetClient" /> 

    <rescap:Capability Name="runFullTrust"/> 

    </Capabilities> 
</Package> 

그리고 클래스 :이처럼 보이는, 그래서

내 매니페스트을 대폭 기본 지금 내가 뭔가를 놓친 거지

using Windows.ApplicationModel; 
using Windows.Foundation; 

namespace FullTrustProcess 
{ 
    public class Ftp 
    { 
     public const string FtpParamGroupId = "TestGroup"; 

     public void RunFtp() 
     { 
      IAsyncAction operation = FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync(FtpParamGroupId); 
     } 
    } 
} 

?

답변

0

내가 없어진 것 같습니다 - 확장이 내가 아는

+0

를 참조에서 UWP에 대한 Windows 바탕 화면 확장 기능을하지만, SO 나에게 한계 :)입니다이 내일 :) 할 수있는 기회를 줄 것이다 –

관련 문제