Access denied on deleting task I created from schtasks

2

I am using Windows 7 as a user without admin privileges (with no chance to change this situation). I have quite a long list of tasks, which are actively managed (I'm adding, deleting and rescheduling them permanently). Each of them indicates a .bat file, which contain further instructions.

At the moment I have three tasks, which cannot be deleted, even though all of them have been created by me, using exactly the same user, exactly the same rights and one of them I tried to delete for a first time a few minutes after it had been created.

I'm trying both Task Manager and a proper schtasks command in CMD. The result is always "access denied" (CMD) or "user account have no privileges to remove the task" (TM). I was able to disable them, but I'd like to remove them from the list of tasks.

The problem occurs for these three tasks only. What is important here - all of my tasks have generally the same structure and properties. Most of them are being deleted without any problem. I cannot see any difference between the mentioned ones, which cannot be removed.

Microsoft Windows [Wersja 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\username>schtasks /Delete /tn "zzz_2015" /F
ERROR: Access denied.

kurp

Posted 2016-01-18T11:29:52.793

Reputation: 942

Are the tasks running at the time you tried to delete them? – DavidPostill – 2016-01-18T11:32:10.653

Is it possible the tasks somehow got modified by a different/while having administrative privileges, and a flag was set requiring administrative privileges? – LPChip – 2016-01-18T11:33:03.120

@DavidPostill nope, nothing like that. One of tchem has been executed properly a few times, one of tchem has been executed once with error and one of tchem has been never executed. At the moment all of them are disabled and not active. – kurp – 2016-01-18T11:34:34.217

@LPChip no such option. One of the tasks has been created by mistake and I tried to remove a few minutes later. Also no automatic changes, I suppose, because, please, note that in most of cases I have no such problem with deleting other tasks. – kurp – 2016-01-18T11:37:10.583

Hi, any progress on this issue? – Miha Trošt – 2018-04-11T14:55:13.597

@MihaTrošt - nope. I've changed PC and problem never returned. But my colegues still have some tasks hanging, which were created by them, but for some reason cannot be deleted - so the problem does exist and still waits for the solution... – kurp – 2018-04-11T18:46:33.877

@kurp, it happened to me today out of nowhere. Your friends should upvote your question, it might get more attention, and possibly a solution. – Miha Trošt – 2018-04-11T19:24:31.050

@MihaTrošt, could you, please, check the solution provided by BerndH below? – kurp – 2018-04-13T18:10:52.047

Answers

2

I had the same problem. What helped me was the following (Platform Win 7, own task could not be deleted):

In the Task Manager select the task in question and first of all deactivate it. In my case this was still possible (whereas "Delete" was not). If this does not work for you, try the next step with the task still being active (I cannot test that anymore).

Then, select "Properties" in the lower panel on the right. The properties window pops up, select the 2nd tab from the right (should be "Options" or similar, I have a German Windows version running). The last check box should read like "Delete task if no further run is scheduled". Check it and choose "Immediately" in the pop down box on the right. Hit "OK" and the task should be gone.

Hint: It might be necessary to adjust the trigger, i.e. provide an end date. With a second task I had to adjust it three times before it worked and the task was deleted. It's difficult for me to give an advice for every possible combination, sorry.

Hope this also works for some of you.

Dr_Be

Posted 2016-01-18T11:29:52.793

Reputation: 21

Good to hear! @kurp Would you mind accepting my answer if it works for some of your colleagues? Thanks. – Dr_Be – 2018-04-19T08:31:27.260