Solved

ITask and System Account

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ORA-01403: no data found 43 90
Shell script to login to remote m/c and execute commands 10 78
How to know only "File created" with EventLog 3 32
Message not shown 5 34
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

863 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

22 Experts available now in Live!

Get 1:1 Help Now