This is almost the same as Planning a task to run when windows close , except that I need to do this programmatically . In addition, I need a guarantee that when the script starts, no application can cancel the shutdown anymore .
Is it possible?
Thank.
Update with little context . My company is developing a kind of antivirus program designed to protect Internet banking customers. Naturally, this program is a frequent target for malware, so it should be protected from uninstallation. The first thing he does is to introduce himself into the system process so that he cannot be killed without bringing his entire system.
One of the typical ways to uninstall such a program is to mark it for deletion at the next shutdown, so our application actively monitors the registry keys that process these pending deletions and deletes them.
I was recently tasked with writing - about irony - an uninstaller for our application. The uninstaller should, of course, delete the files, so it must bypass everything that we ourselves created. It must be compatible with older versions, so changing security mechanisms is not an option.
source
share