🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15257

Spawning and Deleteing an exe file

#15257
From: Steve Craig
Date: Mon, 14 Jul 2003 09:56
14 lines
1357 bytes
I want to spawn and then delete an executeable.  So I tried something
like...

spawnl(P_WAIT, "MyProg.exe", "MyProg.exe", NULL);
DeleteFile("MyProg.exe");

However, althought the file became inaccessible, it did not actually vanish
until I rebooted by pc.  (I also tried using CreateProcess() with identical
results). I really do need the file to disappear  immediately, how can I
cheive this?

Thanks...

Steve
Technical Details
Message-ID: <3f127f9c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,8871a81884d35a65,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-14 03:10:20 PST
From: "Steve Craig" <stevecraig@ozemail.com.au>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Spawning and Deleteing an exe file
Date: Mon, 14 Jul 2003 19:56:51 +1000
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 203.103.158.90
Message-ID: <3f127f9c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1058176924 203.103.158.90 (14 Jul 2003 03:02:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail