Contents Index Topic Contents | ||
Previous Topic: ITask::GetWorkingDirectory Next Topic: ITask::SetMaxRunTime |
ITask::SetApplicationName
HRESULT SetApplicationName( LPCWSTR pwszApplicationName );Assigns a specific application to the current task.
- Returns one of the following values:
S_OK The operation was successful. E_INVALIDARG The arguments are not valid. E_OUTOFMEMORY Not enough memory is available.
- pwszApplicationName
- LPCWSTR that contains an application's name. To clear the application name, set pwszApplicationName to L"".
If you do not specify a path for the application, the Task Scheduler searches the environment path to find the correct path. If the application name specifies a program, it should use the .exe extension to ensure that the Scheduling Agent user interface properly displays the application's icon.
See also ITask::GetApplicationName
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.