windows - How can a program delete its own executable -


is there way running process can delete own executable?

for example, make console application (single exe) , after doing tasks somehow deletes exe file.

i have send single file someone. , want deleted after intended task.

is there anyway in windows

one way use movefileex function movefile_delay_until_reboot flag , null destination. according documentation, this:

registers lpexistingfilename file deleted when system restarts. if lpexistingfilename refers directory, system removes directory @ restart if directory empty.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -