Code that will only execute once
codegolf.stackexchange.com
codegolf.stackexchange.com
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
[1] https://en.wikipedia.org/wiki/Agrippa_%28A_Book_of_the_Dead%...
I still think it was well-done and love the theme of "the mechanism".
* Overheating or overvolting the CPU, GPU or other components
* Erasing boot firmware or boot settings stored in flash memory (and rebooting)
I know there are protection mechanisms, which may be impossible to circumvent, but you can try...
Store a child exe within a parent exe.
When parent exe is run first, it should extract child exe, run it, do whetever it wants and quit.
Child exe's job is to see if parent exe has finished execution. Can be done by searching for windown handle or string.
When parent exe is no longer running, child exe should delete parent and quit.
Satisfies the requirement that parent exe's code will only run once if there is only one distribtion of exe.
Somehow involve Inspector Gadget's boss -- reading the instructions to you, a dot-picture, the sound of a muffled explosion in a trash can, whatever. "This script will self destruct in five seconds."
2) Paste this in it <?php unlink('unlink.php');
3) Visit unlink.php on your browser
<?php unlink(__FILE__);
<?unlink(__FILE__)Better yet, make it an executable script starting with the line:
#!/usr/bin/php -q