Quantcast
Channel: Admins Goodies » xml
Viewing all articles
Browse latest Browse all 10

Ok to edit task’s xml file in c:\windows\system32\Tasks?

$
0
0

Question

I wrote a PowerShell script that check the executable in the < action > tag for each task in the Task directory and mark the < enabled >TRUEorFALSE< / enabled > tag as false/true depending on the validity of the digital signature of the executable. After reading each task, the script re-saves the task file with the same name, type and location.

Now my issue is that I get this message when I lunch task scheduler:

“Task XYZ: The task image is corrupt or has been tampered with.”

This message appears for all the tasks that were scanned and saved.

Does editing task’s xml file directly corrupt the task? Is there any task decency that may cause this error(ex: registry value)?

Asked by Eyad

Answer

This is a security feature. A person or malicious program could edit a task file and insert the location to a hostile program. Windows creates a hash of the task file’s various attributes and contents, and stores it in the registry. If the stored hash differs from the calculated hash, Windows prevents the task from running.

If you want to do something like this, delete the task and re-create it with the task set to disabled.

Answered by Greg Askew

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images