I've recently come up with a rather elegant solution to fix a computer virus, er I mean microsoft windows, and I'd like to develop it a bit further.
PROBLEM: Microsoft enjoys analyzing peoples' computers and data-reporting/mining, consequently tieing up vast memory resources; I've been able to eliminate a few dozens built-in spybots via the cortana privacy settings, and spybot search and destroy, but there are still a few pesky processes which I notice from time to time because it slows down my frames per second substantially while playing multiplayer games (this is extremely unacceptable since this is a gaming computer).
SPECIFICALLY & PARTIAL SOLUTION: So the most notable process I've been struggling with is taskhostw.exe, I've shut down about a half dozen triggers which kicks off this POS, but it either keeps self-repairing or is getting launched from something so utterly ridiculous, it hasn't even crossed my mind (I've run third party software, changed the registry keys, disabled the task scheduler triggers and more and it still persists). I've whipped up a quick script which takes care of the problem REALLY well, and now I'd like to expand on it's functions and tracking abilities.
If anyone else would like to use my script, or build off it, be aware that if the process (or application) in question is one that belongs to microsoft -- you must right click your script and run as administrator:
Code: Select all
#SingleInstance Force
#Persistent
timerloop:
Process, Exist, taskhostw.exe
{
Process, Close, taskhostw.exe
}
sleep 1000
Goto, timerloop
break::ExitApp
And secondly besides wanting to clean up the code -- I'd like to expand its functionality to data log all other processes, with a time stamp of when they opened, and when they closed. The purpose here is to see what other sneaky microsoft processes I may have missed -- this is not neuroticism, they literally program their software to launch when you're not around; don't believe me? check out task scheduler triggers, some execute when they see the keyboard hasn't been accessed in X time passed.
TL:DR
1) Need syntax help for taking the above code and making it more efficient; need to replace the 1-second-checker loop with an event listener that watches for taskhostw.exe starting up
2) Need a quick crash course on generating logs in regards to this, specifically: I would like to add another code snippet that again has a process event listener, but instead of taskhostw.exe, it would be effectively *.exe, and anytime *.exe launches or terminates, it will add a time-stamped log statement to "mylog.txt"