Düzenle

Aracılığıyla paylaş


ITSRemoteProgram::ServerStartProgram method

Specifies a RemoteApp program to start in the remote session. This function must be invoked on a connected session (after the session connected notification is received at the client). Any number of RemoteApp programs can be started in a session. A RemoteApp session will time out if no RemoteApp program is started in the session within the time-out limit, which is two minutes for Windows Server 2008.

Syntax

HRESULT ServerStartProgram(
  [in] BSTR         bstrExecutablePath,
  [in] BSTR         bstrFilePath,
  [in] BSTR         bstrWorkingDirectory,
  [in] VARIANT_BOOL vbExpandEnvVarInWorkingDirectoryOnServer,
  [in] BSTR         bstrArguments,
  [in] VARIANT_BOOL vbExpandEnvVarInArgumentsOnServer
);

Parameters

bstrExecutablePath [in]

The path of the RemoteApp program executable file on the server.

bstrFilePath [in]

The path of a file to open on the server through a file association, for example "C:\\Documents\\MyReport.docx". If you specify bstrFilePath, you should not specify the bstrExecutablePath parameter, and vice versa. You should only specify one of the parameters.

bstrWorkingDirectory [in]

The working directory on the server for the RemoteApp program.

vbExpandEnvVarInWorkingDirectoryOnServer [in]

Indicates whether the server should expand environment variables in the working directory path. Set this parameter to VARIANT_TRUE if the working directory path contains environment variables, or VARIANT_FALSE if the working directory path does not contain environment variables.

bstrArguments [in]

The command-line arguments for the RemoteApp program that are specified in bstrExecutablePath. Set this to NULL if bstrExecutablePath is not specified.

vbExpandEnvVarInArgumentsOnServer [in]

Indicates whether the server should expand environment variables in the command-line arguments. Set this parameter to VARIANT_TRUE if the arguments contain environment variables, or VARIANT_FALSE if the arguments do not contain environment variables.

Return value

Returns S_OK if successful.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Type library
MsTscAx.dll
DLL
MsTscAx.dll
IID
IID_ITSRemoteProgram is defined as FDD029F9-467A-4c49-8529-64B521DBD1B4

See also

ITSRemoteProgram2

ITSRemoteProgram3

ITSRemoteProgram