On POSIX systems, this challenge is trivial because you can unlink ("delete") an executable while it's running. The file is then actually deleted once the program exits.
On Window, you can muck around with child processes that delete their parent. Perhaps more interestingly, you could try to abuse Software Restriction Policies [1]. In theory, you should be able to blacklist your own executable (by hash), so that it can't run ever again. This would also block any copy of the file that you might have kept.
Comments
On POSIX systems, this challenge is trivial because you can unlink ("delete") an executable while it's running. The file is then actually deleted once the program exits.
On Window, you can muck around with child processes that delete their parent. Perhaps more interestingly, you could try to abuse Software Restriction Policies [1]. In theory, you should be able to blacklist your own executable (by hash), so that it can't run ever again. This would also block any copy of the file that you might have kept.
[1] http://technet.microsoft.com/en-us/library/bb457006.aspx