Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: WinXP Windows Scheduler
When using schtasks.exe, I can easily change "Run as" to be System (NT AUTHORITY\SYSTEM), with /RU option.
I want to see task creator (under creator in Scheduled Tasks folder) to be System as well (now I see there my username).
How can I do it?
(If I use AT.exe the creator is autimatically System)
Posted 28-Mar-11 5:16am
Edited 28-Mar-11 7:41am
Dalek Dave at 28-Mar-11 12:42pm
Edited for Grammar and Readability.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can't. You cannot give a process more permissions that you already have.
If the process needs to run as System, a process already running as System has to launch it itself.
erez_l at 28-Mar-11 11:30am
Are you sure? because at.exe creator is System.
Dave Kreskowiak at 28-Mar-11 18:55pm
Yes, I'm sure. AT is run by the user, not the system. The Task Scheduler service runs under svchost under Local System. Any tasks launched by the Task Scheduler have the option of running as System.
The exact same thing applies to SchTasks. SchTasks tells the Task Scheduler service which account to use. A normal user cannot tell TS to use the System account. The Task Scheduler launches the command and can launch it as System because the Task Scheduler service runs under the System account.
The same limitation of users not being able to grant priv's above themselves applied to any code running on the system. Code cannot grant permissions to anything above the account the code is running under.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hello again,
What happens when you use the command line option /RU "SYSTEM". From my reading of the documentation[^] that should solve the problem, assuming you run schtasks from an administrator account.
SCHTASKS /Create /SC hourly /TN Task1 /TR "notepad.exe" /RU "SYSTEM"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 190
1 Jochen Arndt 165
2 PIEBALDconsult 150
3 BillWoodruff 148
4 DamithSL 140
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190

Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 28 Mar 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100