hello
do you know how to force-delete a file, say a loaded .dll
or a running .exe
i know that windows locks it...and the file is actually loaded to memory so it doesn't really need it(am i wrong?)
thanks
if you want to delete a exe oder dll that is currently loaded into memory you have to either terminate/unload it first (which my not always be possible) or have it deleted on windows startup (you need to create a wininit.ini file in your windows directory).
sample wininit.ini:
NUL=C:\WINDOWS\SYSTEM\mydll.dll
ahh cool i haven't known that way
well anyone knows how to do it programmatically?
The MoveFileEx function allows you to specify a flag MOVEFILE_DELAY_UNTIL_REBOOT. If the filename is null, it will perform a Delete!
regards
well...i didn't ask it well enough
how do i delete a file immediately and programmatically?
the MoveFileEx will delete it on next booting...