Share via


ProcessLauncher.RunToCompletionAsync 메서드

정의

오버로드

RunToCompletionAsync(String, String)

새 프로세스를 시작합니다. 이 비동기 함수는 시작된 프로세스가 종료되면 완료됩니다.

RunToCompletionAsync(String, String, ProcessLauncherOptions)

지정된 옵션을 포함하여 새 프로세스를 시작합니다. 이 비동기 함수는 시작된 프로세스가 종료되면 완료됩니다.

RunToCompletionAsync(String, String)

새 프로세스를 시작합니다. 이 비동기 함수는 시작된 프로세스가 종료되면 완료됩니다.

public:
 static IAsyncOperation<ProcessLauncherResult ^> ^ RunToCompletionAsync(Platform::String ^ fileName, Platform::String ^ args);
/// [Windows.Foundation.Metadata.Overload("RunToCompletionAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProcessLauncherResult> RunToCompletionAsync(winrt::hstring const& fileName, winrt::hstring const& args);
[Windows.Foundation.Metadata.Overload("RunToCompletionAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProcessLauncherResult> RunToCompletionAsync(string fileName, string args);
function runToCompletionAsync(fileName, args)
Public Shared Function RunToCompletionAsync (fileName As String, args As String) As IAsyncOperation(Of ProcessLauncherResult)

매개 변수

fileName
String

Platform::String

winrt::hstring

시작할 프로세스의 이름입니다.

args
String

Platform::String

winrt::hstring

프로세스를 실행하기 위한 인수입니다.

반환

비동기 작업이 완료되면 시작된 프로세스의 종료 코드가 포함됩니다.

특성

Windows 요구 사항

앱 기능
systemManagement

설명

이 API를 사용하려면 IoT systemManagement 기능을 사용하고 IgnorableNamespaces 목록에 iot를 포함해야 합니다. 사용자는 Package.appmanifest: <iot:Capability Name="systemManagement"/>에 다음을 추가하고 기존 IgnorableNamespaces 목록에 iot를 추가할 수 있습니다.

프로세스를 시작하려면 .exe .appx 패키지에 포함되거나 이 API의 허용 목록에 등록되어야 합니다. 허용 목록에 .exe 추가하려면 HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EmbeddedMode\ProcessLauncher:AllowedExecutableFilesList 를 수정하고 REG_MULTI_SZ 형식의 문자열에 실행 파일을 추가합니다.

예를 들면 다음과 같습니다.

reg ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EmbeddedMode\ProcessLauncher" /f /v AllowedExecutableFilesList /t REG_MULTI_SZ /d "c:\windows\system32\cmd.exe\0"

추가 정보

적용 대상

RunToCompletionAsync(String, String, ProcessLauncherOptions)

지정된 옵션을 포함하여 새 프로세스를 시작합니다. 이 비동기 함수는 시작된 프로세스가 종료되면 완료됩니다.

public:
 static IAsyncOperation<ProcessLauncherResult ^> ^ RunToCompletionAsync(Platform::String ^ fileName, Platform::String ^ args, ProcessLauncherOptions ^ options);
/// [Windows.Foundation.Metadata.Overload("RunToCompletionAsyncWithOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProcessLauncherResult> RunToCompletionAsync(winrt::hstring const& fileName, winrt::hstring const& args, ProcessLauncherOptions const& options);
[Windows.Foundation.Metadata.Overload("RunToCompletionAsyncWithOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProcessLauncherResult> RunToCompletionAsync(string fileName, string args, ProcessLauncherOptions options);
function runToCompletionAsync(fileName, args, options)
Public Shared Function RunToCompletionAsync (fileName As String, args As String, options As ProcessLauncherOptions) As IAsyncOperation(Of ProcessLauncherResult)

매개 변수

fileName
String

Platform::String

winrt::hstring

시작할 프로세스의 파일 이름입니다.

args
String

Platform::String

winrt::hstring

지정된 프로세스에 대한 인수입니다.

options
ProcessLauncherOptions

프로세스를 실행하기 위한 관련 옵션입니다.

반환

비동기 작업이 완료되면 시작된 프로세스의 종료 코드가 포함됩니다.

특성

Windows 요구 사항

앱 기능
systemManagement

설명

이 API를 사용하려면 IoT systemManagement 기능을 사용하고 IgnorableNamespaces 목록에 iot를 포함해야 합니다. 사용자는 Package.appmanifest: <iot:Capability Name="systemManagement"/>에 다음을 추가하고 기존 IgnorableNamespaces 목록에 iot를 추가할 수 있습니다.

프로세스를 시작하려면 .exe .appx 패키지에 포함되거나 이 API의 허용 목록에 등록되어야 합니다. 허용 목록에 .exe 추가하려면 HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EmbeddedMode\ProcessLauncher:AllowedExecutableFilesList 를 수정하고 REG_MULTI_SZ 형식의 문자열에 실행 파일을 추가합니다.

예를 들면 다음과 같습니다.

reg ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EmbeddedMode\ProcessLauncher" /f /v AllowedExecutableFilesList /t REG_MULTI_SZ /d "c:\windows\system32\cmd.exe\0"

추가 정보

적용 대상