Run a given command on the console.
public:
HRESULT Run(
LPCWSTR pszCommandLine,
LPCWSTR pszWorkingDirectory,
DWORD dwFlags,
DWORD dwPeriod,
IXtfRemoteRunCallback *pCallback
)
pszCommandLine
Type: LPCWSTR
The command line to execute on the remote console.
pszWorkingDirectory
Type: LPCWSTR
The working directory on the remote console.
dwFlags
Type: DWORD
One or more of the flags described in Remarks.
dwPeriod
Type: DWORD
When output is redirected, it is batched and sent back to the client periodically. This value specifies the number of milliseconds between batching operations.
pCallback
Type: IXtfRemoteRunCallback *
A callback used when standard input or output are redirected.
Type: HRESULT
HRESULT success or error code.
The dwFlags parameter is a bitwise-AND of any of the following values:
| Flag value | Effect | XTFRUN_WAIT | Wait for the command to complete. | |
|---|---|---|---|---|
| XTFRUN_GUEST_USER | Run under the guest user account. | |||
| XTFRUN_REDIRECT_INPUT | Redirect standard input through the given pCallback. | |||
| XTFRUN_REDIRECT_OUTPUT | Redirect standard output through the given pCallback. | |||
| XTFRUN_REDIRECT_BOTH | Redirect both standard input and standard output through the given pCallback. |
Header: Declared in xtfremoterun.h.
Library: Use xtfremoterun.lib.