Contents Index Topic Contents | ||
Previous Topic: IScheduledWorkItem::Run Next Topic: IScheduledWorkItem::SetComment |
IScheduledWorkItem::SetAccountInformation
HRESULT SetAccountInformation( LPCWSTR pwszAccountName, LPCWSTR pwszPassword );Sets the account name and password for the task. This method is for Windows NT®; on Windows® 9x, this method will return SCHED_E_NO_SECURITY_SERVICES, indicating the Task Scheduler security services are not available. The Task Scheduler service must be running for this method to succeed.
- 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. SCHED_E_NO_SECURITY_SERVICES Security services are available only on Windows NT.
- pwszAccountName
- LPCWSTR that contains the account name. This account name is assigned to the current task.
- pwszPassword
- LPCWSTR that contains the account password. This password is assigned to the current task.
See also IScheduledWorkItem::GetAccountInformation
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.