wwCodeUpdate::RunUpdateExe

This method fires the Update Exe or script application by taking a full command line to the external app or script. Runs the app and then QUITs the current instance of Visual FoxPro.

If you're using the CodeUpdate.exe file compiled from the CodeUpdate.prg snippet your command line looks like this:

Example (all on one line):

CodeUpdate "wwReader70.exe" 
	"d:\wwReader\codeupdate\wwReader_update.exe /auto d:\wwReader" 
	"West Wind Message Reader"


loUpdate.RunUpdateExe([CodeUpdate "wwReader70.exe" "] + ;
                   SYS(5) + CURDIR() +;
                   [codeupdate\wwReader_Update.exe /auto ] + ;
                   SYS(5) + CURDIR() + [" ] + ;
                   ["West Wind Message Reader"])


Using the Windows Scripting Host sample:

loUpdate.RunUpdateExe([WSCRIPT CodeUpdate.vbs "wwReader70.exe" "] + ;
                   SYS(5) + CURDIR() +;
                   [codeupdate\wwReader_Update.exe /auto ] + ;
                   SYS(5) + CURDIR() + [" ] + ;
                   ["West Wind Message Reader"])

o.RunUpdateExe(lcUpdateExe)

Parameters

lcUpdateExe
A full command line for the EXE to run that handles unzipping and restarting of the application. This EXE should handle:

  • Unzipping the downloaded archive file
  • Displaying status information
  • Checking if the main application has shut down
  • Restarting the main application EXE

How this EXE does this is up to you. The examples above demonstrate with CodeUpdate.EXE and the Windows Script Host example which take the EXE file name, a WinZip unpack command line and window title as parameters.


Example

 loUpdate.RunUpdateExe([WSCRIPT CodeUpdate.vbs "wwReader70.exe" "] + ;
                   SYS(5) + CURDIR() +;
                   [codeupdate\wwReader_Update.exe /auto ] + ;
                   SYS(5) + CURDIR() + [" ] + ;
                   ["West Wind Message Reader"])

See also:

Class wwCodeUpdate

© West Wind Technologies, 1996-2024 • Updated: 05/22/08
Comment or report problem with topic