> So - is there an idea how to delete, rename or overwrite the active FoxPro
> program.
>
> Thanks,
> Primoz.
Sounds interesting... you could write an On Shutdown routine which would
be cross-renaming the new exe with the old one, and working when the
active exe really exits... a scheme would go like this:
* Upgrade proc
- copy the new exe from the floppy to temp directory
set text to little.prg
set text on
\\rename <
> to <>
\rename <> to <>
\quit
\
set text off
set text to
on shutdown do little
No, it won't work - the .exe can't compile little.prg unless run from
VFP environment; so we better make little.bat - it contains only two
rename commands, so we write the corresponding part of the upgrade
procedure like this:
set text to little.bat
set text on
\\ren <> <>
\ren <> to <>
\
set text off
set text to
on shutdown run little.bat
....all this might eventually work, assuming the .exe is closed when On
Shutdown gets activated. If it's not closed yet, we'll have to think of
something else. Maybe write a batch to run with some delay, to give the
program some time to unload, run the batch, quit while the batch delays,
have the batch rename exes and run again.