Solved

ITask and System Account

Posted on 2004-10-13
3
403 Views
Last Modified: 2013-11-20
Supposedly with the SetAccountInformation in the ITask class if you pass "" for the account name and NULL for the password it sets the task to run as the SYSTEM account. They say that no other way will work. This doesn't work though and the task cannot run. I have tried a number of other ways, but nothing works. Any ideas of how to make this work?

I know that using the schtasks program you can set it to SYSTEM and it does work, but I am looking for a way without using them, and directly from code.
0
Comment
Question by:thaimin
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 125 total points
ID: 12301056
Well, to be more specific, 'they' (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/taskschd/taskschd/ischeduledworkitem_setaccountinformation.asp) say it has to be L"" and furthermore:

"If pwszAccountName specifies the local system account, the caller must be an administrator on the local computer or an application running in the local system account. If not, this method will fail."

If your account does not belong to the admin group, you cannot schedule anything to run as 'SYSTEM'.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now