Windows XP How to retrieve logged on user credentials for ITask::SetAccountInformation

Joined
Aug 1, 2009
Messages
1
Reaction score
0
I need to user Windows Task Scheduler to to invoke an application which will store some data under logged on user’s profile. However,I will need to explicitely pass credentials of the current logged on user to the SetAccountInformation(LPCWSTR pwszAccountName, LPCWSTR pwszPassword) method. Is that possible to retrieve the user credentials without using CredUIPromptForCredentials method to ask and pass it to SetAccountInformation method? Or do you have any suggestion to get around this?

My basic requirements are:

1) Use Windows Task Scheduler to invoke an appliation

2) This application needs to write some data under user profile, say My Documents.

Thanks.

Leo
 
Back
Top