Solved

ITask and System Account

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to know only "File created" with EventLog 3 35
substring method in java 1 136
Doc'in system (example?) BA 7 120
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 116
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 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