Click here to Skip to main content
13,046,087 members (56,640 online)
Rate this:
Please Sign up or sign in to vote.

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 4:16am
Updated 28-Mar-11 6:41am
Dalek Dave433.3K
Dalek Dave 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 28-Mar-11 11:30am
Are you sure? because at.exe creator is System.
Dave Kreskowiak 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 28 Mar 2011
Copyright © CodeProject, 1999-2017
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