> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run

> IXtfRemoteRunClient::Run Method

# IXtfRemoteRunClient::Run Method

콘솔에서 지정된 명령을 실행합니다.

## Syntax

```cpp theme={null}
public:
HRESULT Run(
         LPCWSTR pszCommandLine,
         LPCWSTR pszWorkingDirectory,
         DWORD dwFlags,
         DWORD dwPeriod,
         IXtfRemoteRunCallback *pCallback
)  
```

### Parameters

*pszCommandLine*\
Type: LPCWSTR

원격 콘솔에서 실행할 명령줄입니다.

*pszWorkingDirectory*\
Type: LPCWSTR

원격 콘솔의 작업 디렉터리입니다.

*dwFlags*\
Type: DWORD

Remarks에 설명된 플래그 중 하나 이상입니다.

*dwPeriod*\
Type: DWORD

출력이 리디렉션될 때, 출력은 일괄 처리되어 주기적으로 클라이언트로 다시 전송됩니다. 이 값은 일괄 처리 작업 사이의 밀리초 수를 지정합니다.

*pCallback*\
Type: [IXtfRemoteRunCallback \*](https://docs.xbox.com/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback.md)

표준 입력 또는 출력이 리디렉션될 때 사용되는 콜백입니다.

### Return value

Type: HRESULT

HRESULT 성공 또는 오류 코드.

## Remarks

dwFlags 매개 변수는 다음 값의 비트 AND입니다:

| Flag value | Effect |
| - | - |
| XTFRUN\_WAIT | 명령이 완료될 때까지 대기합니다. 기본 동작은 명령을 실행하고 완료를 기다리지 않고 즉시 반환합니다. |
| XTFRUN\_GUEST\_USER | 게스트 사용자 계정으로 실행합니다. 기본 동작은 상승된 시스템 사용자로 실행합니다. |
| XTFRUN\_REDIRECT\_INPUT | 지정된 pCallback을 통해 표준 입력을 리디렉션합니다. XTFRUN\_WAIT를 암시합니다. |
| XTFRUN\_REDIRECT\_OUTPUT | 지정된 pCallback을 통해 표준 출력을 리디렉션합니다. XTFRUN\_WAIT를 암시합니다. |
| XTFRUN\_REDIRECT\_BOTH | 지정된 pCallback을 통해 표준 입력과 표준 출력을 모두 리디렉션합니다. XTFRUN\_WAIT를 암시합니다. |

[IXtfRemoteRunCallback](https://docs.xbox.com/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback.md)에는 입력 및 출력 콜백 함수가 모두 포함되어 있습니다. 함수에 입력 *또는* 출력이 필요하거나 입력 *및* 출력이 필요한지에 따라 이러한 멤버 중 하나 또는 둘 다에 값을 채울 수 있습니다.

콜백 *input*에 대한 자세한 내용은 [IXtfRemoteRunCallback::Input](https://docs.xbox.com/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/methods/ixtfremoteruncallback_input.md)을 참조하세요.

콜백 *output*에 대한 자세한 내용은 [IXtfRemoteRunCallback::Output](https://docs.xbox.com/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/methods/ixtfremoteruncallback_output.md)을 참조하세요.

## Requirements

**Header:** xtfremoterun.h

**Library:** xtfremoterun.lib

**Supported platforms:** Windows(XBOX 콘솔 도구용)

## See also

[XtfRemoteRun](https://docs.xbox.com/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient.md)\
[IXtfRemoteRunClient](https://docs.xbox.com/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient.md)\
[IXtfRemoteRunCallback](https://docs.xbox.com/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback.md)


## Related topics

- [Run Task](https://docs.xbox.com/api-reference/scheduledtask/run-task.md)
- [XAsyncRun](https://docs.xbox.com/ko/reference/system/xasync/functions/xasyncrun.md)
- [실행 (wdRun.exe)](https://docs.xbox.com/ko/tools/tools-console/console_commandlinetools/wdrun.md)
- [XtfCreateRemoteRunClient](https://docs.xbox.com/ko/reference/tools/xtf/xtfremoterun/methods/xtfremoterun_xtfcreateremoterunclient.md)
- [XtfRemoteRun 멤버(API 목차)](https://docs.xbox.com/ko/reference/tools/xtf/xtfremoterun/xtfremoterun_members.md)
