[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ITask and System Account

Posted on 2004-10-13
3
Medium Priority
?
429 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
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses
Course of the Month19 days, 5 hours left to enroll

834 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