Joshua ben Jore <twists@xxxxxxxxx> writes:
>On 2/22/06, Nick Ing-Simmons <nick@xxxxxxxxxxxxxxx> wrote:
>> Randy W. Sims <RandyS@xxxxxxxxxxxxxxxxxxxx> writes:
>
>> Build.bat cannot delete itself on Windows.
>> You can't delete executing things. This is why Windows needs to
>> reboot after installing upgrades.
>> A running thing can ask for a delete on next reboot, but cannot delete
>> an open file.
>
>You can have it delete itself if you can manage to call the CreateFile
>Win32 API function with the FILE_FLAG_DELETE_ON_CLOSE flag. At least
>that's what demerphq told p5p about something similar when trying to
>get M::B to be able to install Cwd.
And there was a whole thread ...
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp
Well that flag is a help, but not suffient, as a browse of URL above confims:
A. It don't work on Win9x like things.
B. It don't work if there is an _existing_ open other than ours unless that
open had other ANOTHER flag set.
Does cmd.exe set FILE_SHARE_DELETE access when it opens Build.bat ?
>
>Josh
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
|