Open trlkly opened 4 years ago
Interesting. I thought that RepairTasks had more or less outlived its usefulness now that most people are on Windows 10, or if they're not, are no longer reverting from Windows 10 to Windows 7. But maybe there is life in the old warhorse yet, and scenarios where RepairTasks may be able to help.
Could you tell me please what version of Windows are you running, and what the symptoms of your task problems were?
Dijji
It's Windows 7 still--I've had troubles on this PC with Windows 10 on this PC, but that was long ago, and I've even done a fresh Win7 install (from scratch--I got a new SSD) since then. The problem with Task scheduler only arose recently. That said, I'm not sure my problem was really OS-specific.
What I think happened is that one of the antiviruses I was trying out screwed up its uninstall, and left corrupted tasks behind, as that is all I had done recently. The symptoms were that any time I'd open Task Scheduler, I would get repeated warnings about corrupted tasks, all of them named {1} or {0} (can't remember which), and when it finally gave me access to the app, only the top level tasks were present--none of the ones under the Microsoft folder, for instance. However, the Windows\Tasks folder still had all my tasks.
I tried a repair using your app, and the only fix was that a log directory didn't exist, and fixing that didn't help. I tried using your ZIP file to reset/replace all the tasks in that tasks folder (backing up the old ones and then deleting them), then running your program. While it did claim to repair them all, I kept getting the errors. So I restored my backed up tasks
Only deleting all the tasks in the registry (and backing them up) and allowing your program to recreate all the registry tasks finally fixed the problem. I got all my tasks back, including the custom ones I had added over the years.
I am so grateful your program exists., as I read through all of the manual steps and they were extremely daunting. I thought surely someone had written an automated tool. That you made it open source was why I trusted it.
Thank you. I feel the same way you do about trusting "repair" utilities found on the Internet. It's about as attractive as going into the local bar and asking for volunteers to help sort out your bank accounts. Hence, open source and as much explanation and provenance as possible.
I think you have it right in that the problem was a partial uninstallation. Two things have to be in sync: what it says in the registry, and the XML files in the Tasks directory. TaskRepair keys off the XML files, and makes sure there are registry entries to match, because it is the registry entries that rollback from Windows 10 loses. In your case, however, the uninstallation removed the XML files, but left the registry entries behind, causing the problems.
The right fix to TaskRepair would I think be to check for orphaned registry entries with no corresponding XML files, and offer to clean them up. Deleting just those entries would reduce the risk of causing collateral damage by deleting the whole set, at which point you had better have the XML files, or you will have nothing.
I think this would be a good thing for any remaining hardy Windows 7 users, and I will add this to my to-do list, though not at a very high priority, as it only helps a diminishing audience. Windows 10 eliminates the entire problem by holding all information about tasks in the registry, so nothing can get out of sync.
I had a problem with my Task Scheduler, and, at first, your program didn't seem to help. But I wound up getting it to work by finding the tasks in the registry (at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks. and .\Tree) and deleting them (after backing them up) and then using the Scan and Repair options in your program. To my surprise, this finally fixed the issue.
So I thought it might be nice if you could offer a way to automatically perform this feature. It would probably be prudent to backup the registry entries in a .reg file, just in case. But a "wipe tasks from registry and rebuild" might be useful for some users.
Or, at the very least, maybe a button that would open regedit at the correct location so people could mess with the tasks themselves if your program doesn't work at first.