[delphi] How to have an EXE file delete itself
http://www.delphifaq.com/faq/delphi_windows_API/f530_0.htm
Both Windows 95 and NT provide mechanisms for doing just this.
Under Win95 you use the WinInit.ini file. Create a [rename] section and
put in entries like "NewName.txt=OldName.txt" to have files renamed, or
"nil=OldName.txt" to have them deleted. Windows will perform this at
the next boot.
Under Windows NT, the MoveFileEx function has a parameter that allows
you to defer the move (or delete) until the next boot. It stores the
list of files to be processed in the registry.
Content-type: text/html
반응형
'Delphi, RadStudio' 카테고리의 다른 글
[개발/delphi] how to register an OCX (0) | 2011.12.12 |
---|---|
[개발/delphi] Starting and stopping Windows services (0) | 2011.12.12 |
[개발/delphi] 외부 프로그램 실행하고 기다리기 Execute and wait (0) | 2011.12.12 |
[delphi] Tracking DLL loading, attaching, detaching and unloading (0) | 2011.12.12 |
[개발/delphi] RLINK 32: out of memory (0) | 2011.12.12 |
댓글