Solved

ITask and System Account

Posted on 2004-10-13
3
406 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how do i create updater to My Activex application? 3 88
bigDiff challenge 17 106
has77  challenge 9 85
Updating statistics with error notification email in SQL server 4 96
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

810 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