发信人: redfox (Z掉了几乎所有的版...), 信区: BorlandDev
标 题: Delphi编程 -- 3.9 可执行的文件删掉它自己?
发信站: 哈工大紫丁香 (2000年09月01日13:56:31 星期五), 站内信件
一个可执行的文件怎么删掉它自己?
How Can A Exe File Kill himself?
a common trick to make a program self-destruct is to have it write a
tiny
batch file, and, as the very last thing it does before closing,
starting
this batch file with a
winexec(batchfilename, SW_HIDE );
The batch deletes the program and then can delete itself. The last
line is a
del %0
and it is *not* terminated with a carriage return/line feed pair
--
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.227.107]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.260毫秒