Hi,
I have a situation I where the TWebUpdate successfully download all (3) required files for an update of a vcl application of mine, but when application is restarted it is the old EXE that is started.
I'm not sure this could have an effect, or be the reason I see the issue I'm seeing, but due to IT security settings on our company's side, I have already done this:
- Excluded
{$DEFINE USEUAC}in WUpdate.pas. - I start the update with ->
[TWebUpdate].DoUpdate(true); - I've assigned
[TWebUpdate].UseWinTempDir := false; - I've assigned
[TWebUpdate].TempDirectory := '{MyExeDir}\Temp';
How I reproduce the issue on my side:
- Install version 0.9.0.13 on my local machine.
- Make version 0.9.0.14 available on my server with this *.inf file:
[update]
newversion=0.9.0.14
localversion=LongHorn.exe
[files]
count=3
[file1]
url=http://tdwos/AppUpdates/LongHorn/LongHorn.db
targetdir={APP}
[file2]
url=http://tdwos/AppUpdates/LongHorn/LongHorn-WhatsNew.txt
targetdir={APP}
[file3]
url=http://tdwos/AppUpdates/LongHorn/LongHorn.exe_NEW
localversion=LongHorn.exe
[application]
appupdate=1
appname=LongHorn.exe
appcomps=LongHorn.exe_NEW
- I run version 0.9.0.13 and request an update, I see all 3 files downloaded as expected. BUT in the main directory of my application {MyExeDir} I see that the *.EXE file (Longhorn.exe) is still the revision 0.9.0.13. In the same directory I also see the *.EXE_NEW (Longhorn.exe_NEW), and that is revision 0.9.0.14. So when application starts again it's the old file being executed.
The other two files *.db & *.txt are correctly the version bewlonging to the new (0.9.0.14) revision.
Here is a clean logfile of the process:
18.11.2025 10:55:34 : [918] Checking for Internet connection (Status:3) (Error:0)
18.11.2025 10:55:34 : [921] Found open Internet connection (Status:3) (Error:0)
18.11.2025 10:55:34 : [915] Download : http://tdwos/AppUpdates/LongHorn.inf (Status:3) (Error:0)
18.11.2025 10:55:35 : [926] Update control file found (Status:3) (Error:0)
18.11.2025 10:55:35 : [933] Version based update found (Status:3) (Error:0)
18.11.2025 10:55:35 : [979] Check versions (Status:3) (Error:0)
18.11.2025 10:55:35 : [944] Version check : Version compare of LongHorn.exe:0.9.0.13 with 0.9.0.14:0.9.0.14 (Status:3) (Error:0)
18.11.2025 10:55:35 : [929] New version found : 0.9.0.14 (Status:5) (Error:0)
18.11.2025 10:55:35 : [949] Closed Internet connection (Status:3) (Error:0)
18.11.2025 10:55:35 : [949] Closed Internet connection (Status:3) (Error:0)
18.11.2025 10:55:41 : [968] Start update : Non threaded update --------------------------- (Status:0) (Error:0)
18.11.2025 10:55:41 : [966] OS version : Unknown (Status:0) (Error:0)
18.11.2025 10:55:41 : [967] IE version : (not found) (Status:0) (Error:0)
18.11.2025 10:55:41 : [969] Compiler : (Status:0) (Error:0)
18.11.2025 10:55:41 : [970] Installed IDEs : (Status:0) (Error:0)
18.11.2025 10:55:41 : [963] Start WebUpdate process with version : 2.6.5.1 (Status:0) (Error:0)
18.11.2025 10:55:41 : [918] Checking for Internet connection (Status:3) (Error:0)
18.11.2025 10:55:41 : [921] Found open Internet connection (Status:3) (Error:0)
18.11.2025 10:55:41 : [915] Download : http://tdwos/AppUpdates/LongHorn.inf (Status:3) (Error:0)
18.11.2025 10:55:41 : [926] Update control file found (Status:3) (Error:0)
18.11.2025 10:55:41 : [933] Version based update found (Status:3) (Error:0)
18.11.2025 10:55:41 : [979] Check versions (Status:3) (Error:0)
18.11.2025 10:55:41 : [944] Version check : Version compare of LongHorn.exe:0.9.0.13 with 0.9.0.14:0.9.0.14 (Status:3) (Error:0)
18.11.2025 10:55:41 : [929] New version found : 0.9.0.14 (Status:5) (Error:0)
18.11.2025 10:55:41 : [943] Found file update instruction (Status:3) (Error:0)
18.11.2025 10:55:41 : [971] Processing file : http://tdwos/AppUpdates/LongHorn/LongHorn.db[,nv=,nd=,ns=0,nc=-1] (Status:0) (Error:0)
18.11.2025 10:55:41 : [979] Check versions (Status:3) (Error:0)
18.11.2025 10:55:41 : [971] Processing file : http://tdwos/AppUpdates/LongHorn/LongHorn-WhatsNew.txt[,nv=,nd=,ns=0,nc=-1] (Status:0) (Error:0)
18.11.2025 10:55:41 : [979] Check versions (Status:3) (Error:0)
18.11.2025 10:55:41 : [971] Processing file : http://tdwos/AppUpdates/LongHorn/LongHorn.exe_NEW[LongHorn.exe,nv=,nd=,ns=0,nc=-1] (Status:0) (Error:0)
18.11.2025 10:55:41 : [979] Check versions (Status:3) (Error:0)
18.11.2025 10:55:43 : [915] Download : http://tdwos/AppUpdates/LongHorn/LongHorn.db (Status:3) (Error:0)
18.11.2025 10:55:43 : [915] Download : http://tdwos/AppUpdates/LongHorn/LongHorn-WhatsNew.txt (Status:3) (Error:0)
18.11.2025 10:55:43 : [915] Download : http://tdwos/AppUpdates/LongHorn/LongHorn.exe_NEW (Status:3) (Error:0)
18.11.2025 10:55:44 : [962] Found application component : LongHorn.exe_NEW (Status:0) (Error:0)
18.11.2025 10:55:44 : [948] Finished processing update control file (Status:3) (Error:0)
18.11.2025 10:55:44 : [949] Closed Internet connection (Status:3) (Error:0)
18.11.2025 10:55:44 : [949] Closed Internet connection (Status:3) (Error:0)
18.11.2025 10:55:44 : [959] Restart app in directory : C:\TDWOS Software\LongHorn (Status:0) (Error:0)
18.11.2025 10:55:44 : [958] Spawn 48908 L "C:\TDWOS Software\LongHorn\LongHorn.exe" " " "C:\TDWOS Software\LongHorn\Temp" LongHorn.exe_NEW (Status:0) (Error:0)
18.11.2025 10:55:49 : [000] UPD v2.0.4.1 started
18.11.2025 10:55:49 : [000] UPD current directory: C:\TDWOS Software\LongHorn
18.11.2025 10:55:49 : [000] UPD waited from 18.11.2025 10:55:48:108 to 18.11.2025 10:55:48:482 for application close
18.11.2025 10:55:49 : [000] UPD restart C:\TDWOS Software\LongHorn\LongHorn.exe
18.11.2025 10:55:49 : [000] UPD has EXE restarted
Can I please ask why my old EXE is started rather than the new downloaded one?
Thank you in advance!
Regards,
Leif Eirik
