• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

Windows 2000 Scheduled Tasks - cannot delete

I have a Win2k SP2 Server, with a number of scheduled tasks - but I cannot delete any of them when logged on as domain administrator!

I can create tasks, and edit tasks' properties.
I am aware that it is possible to remove this right using AD group policies, but have confirmed there are none in effect in our domain, and that other domain controllers in the same OU do not have the problem.

Using the below .reg file, I am able to even further restrict my rights (eg. remove the ability to even add a new task!) but not allow deleting. Have tried values of 0,1,2 on the "Task Creation" key.

Where else in the registry could this be being prevented?
(thanks in advance) - Matt

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\LocalMachine\Software\Policies\Microsoft\Windows\Task Scheduler5.0]
"Allow Browse"=dword:00000000
"Disable Advanced"=dword:00000000
"DragAndDrop"=dword:00000000
"Execution"=dword:00000000
"Property Pages"=dword:00000000
"Task Creation"=dword:00000000
"Task Deletion"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Task Scheduler5.0]
"Allow Browse"=dword:00000000
"Disable Advanced"=dword:00000000
"DragAndDrop"=dword:00000000
"Execution"=dword:00000000
"Property Pages"=dword:00000000
"Task Creation"=dword:00000000
"Task Deletion"=dword:00000000
0
MattW2003
Asked:
MattW2003
  • 5
  • 4
  • 2
1 Solution
 
MSGeekCommented:
Have you tried stopping the service before deleting the task?
0
 
MattW2003Author Commented:
yes, have tried restarting the "Task Scheduler" service...(first thing I tried)
0
 
pbarretteCommented:
Hi Matt,

Try starting an AT job to interactively open a command prompt:
AT 12:00:00 /INTERACTIVE "CMD.EXE"

Then, within the new command window type:
SCHTASKS /DELETE /TN * /F

Since AT commands run in the context of the System user, the CMD.EXE will have System permissions. These are usually higher than Administrator permissions.

The SCHTASKS command will delete all scheduled tasks. If you only want to delete specific tasks, then run:
SCHTASKS

to get the task names, then use:
SCHTASKS /DELETE /TN TASKNAME /F

To delete a specific task.

pb
0
Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

 
MSGeekCommented:
pbarrette...very nice.
0
 
pbarretteCommented:
Hi MSGeek,

It's really a great one to use with TASKMAN. Lets you kill off those failed system procs that Admin can't kill.

pb
0
 
MattW2003Author Commented:
pbarrette,

where do we get SCHTASKS ?
it is not a command available nativly in Win2k, nor is in in the Win2k Reskits (Pro or Server), and I cant find any download for it on Google.

"sctasks.exe" is part of WinXP SP1, but have tried extracting the file from the SP and running it on W2k and...

D:\Temp>sctasks
ERROR: The Target system must be running Windows XP or above.

mw
0
 
pbarretteCommented:
Oops,

Try this one instead.. I just tested on my Win2K machine:
AT HH:MM:SS /INTERACTIVE CONTROL SCHEDTASKS

This should bring up the Task Scheduler window in the context of the System account.

pb
0
 
MattW2003Author Commented:
pbarrette,

again another elegant response, which worked correctly on my Win2k Pro workstation, but on the server with the issue, the task scheduler does not pop up when the AT task event executes.

So its looking like the LocalSystem account cant open the CONTROL SCHEDTASKS...

I am keen to brute force this, does anyone know where the tasks are stored (in registry, or in a file somewhere?), so we can manually delete all tasks...?
0
 
pbarretteCommented:
Hi Matt,

Found it.
C:\WINNT\TASKS\TaskName.JOB

pb
0
 
MattW2003Author Commented:
pbarrette,

cheers, thats the trick!
FYI, browsing to the folder in windows explorer does not work. But if we go to a cmd.exe commandline, and;
C:
Cd \Winnt\Tasks
Del *.job
(or Del "job name.job")...

We can remove the jobs.
Nice. Appreciate your help.

mw
0
 
pbarretteCommented:
Hi Matt,

No problem. Glad you've got it working.
pb
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 5
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now