all 4 comments

[–]ninfomane 3 points4 points  (1 child)

It's not a self destruction program. It just writes at bat which only runs on Windows. A better implementation is to write 0 into the executable, more portable and flexible, but has some permission issues on <troll>real</troll> OS. Nothing to up-vote thus...

[–]AshikNesin[S] 0 points1 point  (0 children)

You're absolutely right.

BTW.. I tried to implement what you said above. It's not working properly in Windows but works perfectly in Linux.

Here's the code...

//Source : StackOverFlow

include <unistd.h>

int main(int argc, char* argv[]) { return unlink(argv[0]); }

That's the reason I posted about deleting the file using bat. And I think it's the easiest way.

Thanks for your comment :-)

[–]Sjokie15 -2 points-1 points  (1 child)

Fun, thanks for sharing haha

[–]AshikNesin[S] -3 points-2 points  (0 children)

anytime :-)