Re: self deleting exe ? by The
The
Mon Nov 20 19:59:47 CST 2006
yeah, too bad windows is not as smart as linux in this regard.
on linux, each file has a reference count (link count) of the number of
processes that have the file opened (plus 1 for the file system), so when
you delete a file, you just "unlink" it, i.e. remove the link from the
file-system itself, so the file will still exist until the application
terminates, at which time the link count becomes 0 and the file is deleted
(if no other process have opened that file). smart :)
"Lisa Pearlson" <no@spam.plz> wrote in message
news:%23mjArKPDHHA.4372@TK2MSFTNGP03.phx.gbl...
> Hi,
>
> Common problem:
>
> I want to make an executable that when run will delete itself.
> The tricky part here is that you can't delete yourself because the file
> will be in use!
> On Windows you can use RunOnce registry key, so it gets deleted after
> reboot.
> What are ways to do this on PPC? How can executions be scheduled?
>
> Lisa
>