2012-11-26 3 views
4

새 프로세스를 시작하기 위해 System.Diagnostics.Process를 찾을 수 없습니다. 나는 이것이 의도적으로 이루어 졌다고 생각한다. 그러나 다른 방법이 있습니까? 이것은 가능한가?Win 8 앱에서 프로세스를 시작하는 방법은 무엇입니까?

+0

http://stackoverflow.com/questions/12334226/open-an-url-in-the-default-web-browser-in-winrt help? –

+0

아니요 ... URL/URI를 열고 싶지 않습니다. –

+0

@MarcelB Win 8 App ...에서 직접 EXE를 시작할 수는 없습니다 ... – Yahia

답변

4

이 참조는 Windows 8 Metro 응용 프로그램 : How to Start a external Program from Metro App에서 사용할 수 있습니다. 모든 Metro 스타일 응용 프로그램은 모래 상자가 많은 환경에서 작동하며 외부 응용 프로그램을 직접 시작할 수있는 방법이 없습니다.

당신은 사용해 볼 수 있습니다 Launcher class

  1. Launcher.LaunchFileAsync

    // Path to the file in the app package to launch 
    string exeFile = @"C:\Program Files (x86)\App.exe"; 
    
    var file = await Windows.ApplicationModel.Package.Current.InstalledLocation 
             .GetFileAsync(exeFile); 
    
    if (file != null) 
    { 
        // Set the option to show the picker 
        var options = new Windows.System.LauncherOptions(); 
        options.DisplayApplicationPicker = true; 
    
        // Launch the retrieved file 
        bool success = await Windows.System.Launcher.LaunchFileAsync(file, options); 
        if (success) 
        { 
         // File launched 
        } 
        else 
        { 
         // File launching failed 
        } 
    } 
    
  2. Launcher.LaunchUriAsync

참조 : Can I use Windows.System.Launcher.LauncherDefaultProgram(Uri) to invoke another metro style app?

0

대도시 이외의 다른 프로세스를 열 수없는 것처럼 보입니다. * .txt와 같은 URL이나 파일은 열 수 있지만 * .cmd 또는 * .exe는 열 수 없습니다.

사용자 지정 파일 연결이 있으면 사용자 지정 파일 이름 확장명이있는 빈 파일을 열어 프로세스를 시작할 수 있습니다. 그러나 앱에서 협회를 추가하기 위해 레지스트리를 편집 할 수는 없습니다.
이렇게하기위한 앱 전용 방법은 없습니다 (아직 발견되지 않은 해킹을 제외하고는)).

+1

Windows Store 앱이 인증을 통과하여 실제로 Windows Store에 들어가게하려면 "해킹"이 옵션이 아닙니다. –

+0

알아요 ... 나는 진지한 것을 의미하지는 않았다 ... –

관련 문제