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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -