Skip to content

Attempting to disable a task results in COMException. #945

Answered by dahall
Monsoonexe asked this question in Q&A
Discussion options

You must be logged in to vote

That error is ERROR_NONE_MAPPED: No mapping between account names and security IDs was done. See this TechNet article for some insight.

Are you able to view and edit the task in the Task Manager UI? (system app)

To disable a task you can simply write TaskService.Instance.GetTask(taskName).Enabled = false; Maybe this won't throw an exception.

Your exception on deletion is likely due to not running the code in Administrator mode.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Monsoonexe
Comment options

@dahall
Comment options

Answer selected by dahall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants