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

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
>



Re: self deleting exe ? by tomfranek

tomfranek
Tue Nov 21 01:12:01 CST 2006

When your program is ending ( on event WM_DESTROY) you can execute
different program and it delete after any timeout your defined file (
your program is now finished - you can delete it)


Re: self deleting exe ? by r_z_aret

r_z_aret
Tue Nov 21 13:09:37 CST 2006

On Mon, 20 Nov 2006 23:26:27 +0100, "Lisa Pearlson" <no@spam.plz>
wrote:

>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?

See my 4 Nov 2004 contribution to a thread called "Self-deleting EXE"
in comp.os.ms-windows.programmer.win32


>
>Lisa
>

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com