Hi Bobby,
Another idea is to put the update functions/procedures into a DLL
and just update the DLL as opposed to the full exe.

Cheers,
Charlie


  ----- Original Message ----- 
  From: Bobby Clarke 
  To: [email protected] 
  Sent: Thursday, January 15, 2009 8:09 AM
  Subject: [delphi-en] Problem with ShellExecute


  I wanted to provide a web update facility for my program B.exe and 
  decided that the easiest way was to write a small control program, 
  A.exe, which checked the web for updates to program B.exe and then 
  starts, via ShellExecute, the latest version of B, perhaps B009.exe.

  This all works very well. The problem comes when I try to update the 
  control program A.exe. Clearly the new version must be called A.exe so 
  that all the shortcuts work. I can download A.new and the only task now 
  is to delete A.exe and rename A.new to A.exe. I have written a small 
  console program C.exe that does this. The problem is knowing how to 
  start C.exe. If I start with a ShellExecute from A.exe, the file A.exe 
  seems to be locked even after A has finished and even if C.exe waits for 
  two minutes before trying to change the A filenames. The A filenames 
  themselves are not locked as I can change using Windows Explorer during 
  the 2 minute wait. I can even change the names by hand-starting a 
  different occurrence of C.exe. Starting C from B fails as the A file is 
  still locked.

  I could place C.exe to be run on the next re-boot, but this seems messy 
  and interferes with the user's control of his PC. Is there another 
  option? All suggestions welcome. How do others update programs using the 
  web?

  Bobby Clarke

  [Non-text portions of this message have been removed]



   

[Non-text portions of this message have been removed]

Reply via email to