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

# IXtfRemoteRunClient::Run Method

> IXtfRemoteRunClient::Run Method

# IXtfRemoteRunClient::Run Method

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

<a id="syntaxSection" />

## Syntax

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

<a id="ID4EG" />

<a id="parametersSection" />

### Parameters

*pszCommandLine*\
Type: LPCWSTR

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

*pszWorkingDirectory*\
Type: LPCWSTR

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

*dwFlags*\
Type: DWORD

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

*dwPeriod*\
Type: DWORD

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

*pCallback*\
Type: [IXtfRemoteRunCallback \*](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback)

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

<a id="ID4EP" />

<a id="retvalSection" />

### Return value

Type: HRESULT

HRESULT 성공 또는 오류 코드.

<a id="remarks" />

## 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](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback)에는 입력 및 출력 콜백 함수가 모두 포함되어 있습니다. 함수에 입력 *또는* 출력이 필요하거나 입력 *및* 출력이 필요한지에 따라 이러한 멤버 중 하나 또는 둘 다에 값을 채울 수 있습니다.

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

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

<a id="requirements" />

## Requirements

**Header:** xtfremoterun.h

**Library:** xtfremoterun.lib

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

## See also

[XtfRemoteRun](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient)\
[IXtfRemoteRunClient](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient)\
[IXtfRemoteRunCallback](/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback)


## Related topics

- [IXtfRemoteRunClient Interface](/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunClient/interfaces/ixtfremoterunclient.md)
- [XtfCreateRemoteRunClient Method](/ko/reference/tools/xtf/xtfremoterun/methods/xtfremoterun_xtfcreateremoterunclient.md)
- [IXtfRemoteRunCallback::Input Method](/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/methods/ixtfremoteruncallback_input.md)
- [IXtfRemoteRunCallback::Output Method](/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/methods/ixtfremoteruncallback_output.md)
- [IXtfRemoteRunCallback Interface](/ko/reference/tools/xtf/xtfremoterun/classes/IXtfRemoteRunCallback/interfaces/ixtfremoteruncallback.md)
