摘要
可执行程序自删除广泛用于卸载程序。一般来说,程序在运行时无法删除自己,但可以用一些巧妙的方法来实现程序的自删除。这里阐述了三种可执行程序自删除的方法,并在VC中实现。这三种方法是:调用批处理文件实现程序自删除,基于CLONE--用复制品启动另一个进程删除原来的可执行文件和释放程序文件在内存中的映射,再调用文件操作删除程序.
Executable program self-deleting is widely used in the uninstallment of the program. Generally speaking, the program cann't delete itself when it is running, however, we can apply some methods to achieve the goal. This paper illustrates three methods and implements them using VC. The three methods are: calling batch file to delete executable program; CLONE based-- using the replica to startup a process to delete original executable program and releasing program s image in the memory before file functions are called to delete program.
出处
《科技广场》
2006年第11期90-91,共2页
Science Mosaic