WebUpdate - AppComps with Params

Hi,

i have successfully integrated WebUpdate in our Application using then TWebUpdate Developers Guide.

I do update the application using a setup application as described on page 12-13.
Now i need to start the setup application with additional params but the appparam is only for app-restart.

Is there a way to get this working?

MFG Uli Korn

A possible solution is to start the EXE by code after webupdate downloaded the update and pass the params in your code that starts SETUP.EXE

Thank you for your quick response.

But this is my very last option.

Anaother question: Is it possible to start a .bat-file instead of a setup.exe?

Yes, sure, it will also start a .BAT file. In fact, it can start anything that can be invoked from the shell will start.

Hi,
it's not possible for me to get it work.

I have a .bat-file: Update.bat


Setup.exe /SILENT



and the update.inf:


[update]
date=21/6/2010

[action]
updateURL=http://xyz.org/update.inf

[application]
appupdate=1
appname=app.exe
appcomps=Update.bat

[files]
count=2

[file1]
url=http://xyz.org/Setup.exe
[file2]
url=http://xyz.org/Update.bat



This Is the log


21.06.2010 10:46:50 : [918] Checking for Internet connection (Status:3) (Error:0)
21.06.2010 10:46:51 : [921] Found open Internet connection (Status:3) (Error:0)
21.06.2010 10:46:51 : [915] Download : http://xyz.org/update.inf (Status:3) (Error:0)
21.06.2010 10:46:51 : [926] Update control file found (Status:3) (Error:0)
21.06.2010 10:46:51 : [928] Date based update found (Status:3) (Error:0)
21.06.2010 10:46:51 : [929] New version found : 21.06.2010 (Status:5) (Error:0)
21.06.2010 10:46:51 : [949] Closed Internet connection (Status:3) (Error:0)
21.06.2010 10:46:51 : [949] Closed Internet connection (Status:3) (Error:0)
21.06.2010 10:46:51 : [968] Start update : Non threaded update --------------------------- (Status:0) (Error:0)
21.06.2010 10:46:51 : [966] OS version : 5.1 (Status:0) (Error:0)
21.06.2010 10:46:51 : [967] IE version : 8.0000 (Status:0) (Error:0)
21.06.2010 10:46:51 : [969] Compiler : D2009 (Status:0) (Error:0)
21.06.2010 10:46:51 : [970] Installed IDEs :  (Status:0) (Error:0)
21.06.2010 10:46:51 : [963] Start WebUpdate process with version : 2.0.12.0 (Status:0) (Error:0)
21.06.2010 10:46:51 : [918] Checking for Internet connection (Status:3) (Error:0)
21.06.2010 10:46:51 : [921] Found open Internet connection (Status:3) (Error:0)
21.06.2010 10:46:51 : [915] Download : http://xyz.org/update.inf (Status:3) (Error:0)
21.06.2010 10:46:51 : [926] Update control file found (Status:3) (Error:0)
21.06.2010 10:46:51 : [928] Date based update found (Status:3) (Error:0)
21.06.2010 10:46:51 : [929] New version found : 21.06.2010 (Status:5) (Error:0)
21.06.2010 10:46:51 : [942] Found URL show instruction (Status:3) (Error:0)
21.06.2010 10:46:51 : [943] Found file update instruction (Status:3) (Error:0)
21.06.2010 10:46:51 : [971] Processing file : http://xyz.org/Setup.exe[,nv=,nd=,ns=0,nc=-1] (Status:0) (Error:0)
21.06.2010 10:46:51 : [971] Processing file : http://xyz.org/Update.bat[,nv=,nd=,ns=0,nc=-1] (Status:0) (Error:0)
21.06.2010 10:47:01 : [915] Download : http://xyz.org/Setup.exe (Status:3) (Error:0)
21.06.2010 10:47:11 : [915] Download : http://xyz.org/Update.bat (Status:3) (Error:0)
21.06.2010 10:47:11 : [962] Found application component : Update.bat (Status:0) (Error:0)
21.06.2010 10:47:11 : [941] Found URL redirection instruction (Status:3) (Error:0)
21.06.2010 10:47:11 : [948] Finished processing update control file (Status:3) (Error:0)
21.06.2010 10:47:11 : [949] Closed Internet connection (Status:3) (Error:0)
21.06.2010 10:47:11 : [949] Closed Internet connection (Status:3) (Error:0)
21.06.2010 10:47:11 : [959] Restart app in directory : C:\Documents and Settings\raugustin\Desktop (Status:0) (Error:0)
21.06.2010 10:47:13 : [958] Spawn 3600 L "C:\Documents and Settings\raugustin\Desktop\app.exe" " " "C:\DOCUME~1\ukorn\LOCALS~1\Temp\" Update.bat (Status:0) (Error:0)
21.06.2010 10:47:13 : [000] upd v2.0.3.4
21.06.2010 10:47:13 : [000] Upd cur dir : C:\Documents and Settings\raugustin\Desktop
21.06.2010 10:47:13 : [000] Upd lzexpand Update.bat C:\Documents and Settings\raugustin\Desktop\
21.06.2010 10:47:13 : [000] Upd lzexpand dest. filename Update.bat
21.06.2010 10:47:13 : [000] Upd restart C:\Documents and Settings\raugustin\Desktop\app.exe  




If ir replace "appcomps=Update.bat" with "appcomps=Setup.exe" then the Setup is executed.
I don't know what to change to make this working.

If you want that the .BAT file is executed after the updates have been download, please set this .BAT file in the appname instruction, ie:


appname=update.bat

It is not working yet.

The log:


21.06.2010 18:06:07 : [918] Checking for Internet connection (Status:3) (Error:0)
21.06.2010 18:06:07 : [921] Found open Internet connection (Status:3) (Error:0)
21.06.2010 18:06:07 : [915] Download : http://xyz.org/update.inf (Status:3) (Error:0)
21.06.2010 18:06:07 : [926] Update control file found (Status:3) (Error:0)
21.06.2010 18:06:07 : [933] Version based update found (Status:3) (Error:0)
21.06.2010 18:06:07 : [944] Version check : Version compare of app.exe:0.2.1.149 with 0,3,1,182:0.3.1.182 (Status:3) (Error:0)
21.06.2010 18:06:07 : [929] New version found : 0.3.1.182 (Status:5) (Error:0)
21.06.2010 18:06:07 : [949] Closed Internet connection (Status:3) (Error:0)
21.06.2010 18:06:07 : [949] Closed Internet connection (Status:3) (Error:0)
21.06.2010 18:06:07 : [968] Start update : Non threaded update --------------------------- (Status:0) (Error:0)
21.06.2010 18:06:07 : [966] OS version : 5.1 (Status:0) (Error:0)
21.06.2010 18:06:07 : [967] IE version : 8.0000 (Status:0) (Error:0)
21.06.2010 18:06:07 : [969] Compiler : D2009 (Status:0) (Error:0)
21.06.2010 18:06:07 : [970] Installed IDEs :  (Status:0) (Error:0)
21.06.2010 18:06:07 : [963] Start WebUpdate process with version : 2.0.12.0 (Status:0) (Error:0)
21.06.2010 18:06:07 : [918] Checking for Internet connection (Status:3) (Error:0)
21.06.2010 18:06:07 : [921] Found open Internet connection (Status:3) (Error:0)
21.06.2010 18:06:07 : [915] Download : http://xyz.org/update.inf (Status:3) (Error:0)
21.06.2010 18:06:07 : [926] Update control file found (Status:3) (Error:0)
21.06.2010 18:06:07 : [933] Version based update found (Status:3) (Error:0)
21.06.2010 18:06:07 : [944] Version check : Version compare of app.exe:0.2.1.149 with 0,3,1,182:0.3.1.182 (Status:3) (Error:0)
21.06.2010 18:06:07 : [929] New version found : 0.3.1.182 (Status:5) (Error:0)
21.06.2010 18:06:07 : [942] Found URL show instruction (Status:3) (Error:0)
21.06.2010 18:06:07 : [943] Found file update instruction (Status:3) (Error:0)
21.06.2010 18:06:07 : [971] Processing file : http://xyz.org/Setup.exe[,nv=,nd=,ns=0,nc=-1] (Status:0) (Error:0)
21.06.2010 18:06:07 : [971] Processing file : http://xyz.org/Update.bat[,nv=,nd=,ns=0,nc=-1] (Status:0) (Error:0)
21.06.2010 18:06:09 : [915] Download : http://xyz.org/Setup.exe (Status:3) (Error:0)
21.06.2010 18:06:21 : [915] Download : http://xyz.org/Update.bat (Status:3) (Error:0)
21.06.2010 18:06:21 : [962] Found application component : Update.bat (Status:0) (Error:0)
21.06.2010 18:06:21 : [941] Found URL redirection instruction (Status:3) (Error:0)
21.06.2010 18:06:21 : [948] Finished processing update control file (Status:3) (Error:0)
21.06.2010 18:06:21 : [949] Closed Internet connection (Status:3) (Error:0)
21.06.2010 18:06:21 : [949] Closed Internet connection (Status:3) (Error:0)
21.06.2010 18:06:21 : [959] Restart app in directory : C:\Documents and Settings\raugustin\Desktop (Status:0) (Error:0)
21.06.2010 18:06:23 : [958] Spawn 1276 L "C:\Documents and Settings\raugustin\Desktop\Update.bat" " " "C:\DOCUME~1\raugustin\LOCALS~1\Temp\" Update.bat (Status:0) (Error:0)
21.06.2010 18:06:24 : [000] upd v2.0.3.4
21.06.2010 18:06:24 : [000] Upd cur dir : C:\Documents and Settings\raugustin\Desktop
21.06.2010 18:06:24 : [000] Upd lzexpand Update.bat C:\Documents and Settings\raugustin\Desktop\
21.06.2010 18:06:24 : [000] Upd lzexpand dest. filename Update.bat
21.06.2010 18:06:24 : [000] Upd restart C:\Documents and Settings\raugustin\Desktop\Update.bat



It seems ok but the .bat-file did not start.

Is the file C:\Documents and Settings\raugustin\Desktop\Update.bat present and correct ?

No, it is not.

Now i have added a "targetdir" for each file, but with the same result.

I have made a simple test-bat which only creates a text-file in tempdirectory vie echo,
but after websetup there is no file.

It seems that the update.bat is never startet.

Can you try to rename the file to be downloaded as update.bat_NEW and use the .INF file:


It doesn't.

But when rename setup.exe to setup.exe_NEW and add setup.exe_NEW to appcomps it works !!!

Now both files are on the Desktop of the User, is it possible to change the download and executing path??

If i try to set a targetdir({TMP}\app) for each file and change "appname=Update.bat" to "appname={TMP}\app\Update.bat" it does not work.

The Log shows something like this:


22.06.2010 15:34:47 : [959] Restart app in directory : C:\Documents and Settings\raugustin\Desktop (Status:0) (Error:0)
22.06.2010 15:34:51 : [958] Spawn 404 L "C:\Documents and Settings\raugustin\Desktop\C:\DOCUME~1\raugustin\LOCALS~1\Temp\ventribo\Update.bat" " " "C:\DOCUME~1\raugustin\LOCALS~1\Temp\" Update.bat_NEW VentriboSetup.exe_NEW (Status:0) (Error:0)
22.06.2010 15:34:52 : [000] upd v2.0.3.4
22.06.2010 15:34:52 : [000] Upd cur dir : C:\Documents and Settings\raugustin\Desktop
22.06.2010 15:34:52 : [000] Upd copying file : C:\DOCUME~1\raugustin\LOCALS~1\Temp\Update.bat_NEW to C:\Documents and Settings\raugustin\Desktop\Update.bat
22.06.2010 15:34:52 : [000] Upd copying file : C:\DOCUME~1\raugustin\LOCALS~1\Temp\VentriboSetup.exe_NEW to C:\Documents and Settings\raugustin\Desktop\VentriboSetup.exe
22.06.2010 15:34:52 : [000] Upd restart C:\Documents and Settings\raugustin\Desktop\C:\DOCUME~1\raugustin\LOCALS~1\Temp\ventribo\Update.bat  



It concetenate the paths which results in a wrong path

I can only assume here that there is an issue with the shell binding of a .BAT file extension with executable content. Is a .BAT file running when you double click on it in Explorer?

Did you remove the TARGETDIR specification for update.bat when you use the update.bat_NEW download ?

I have a solution for my problem.

With TARGETDIR it seems to impossible, so i removed again all TARGETDIR and the files appears on the desktop.
It is not nice but it works, the BAT-file is executed an the setup starts correctly.
After running setup the bat-file removes the setup and bat-file itselfs.

Thank you for your help and patience

Call the update process with WebUpdate.DoUpdate(true)

and the files should not arrive on the desktop (unless your application EXE is on the desktop)