Now from an my application I can download a exe
the exe is on a my website
the exe is the same exe of application but with another name
How I can make to close My application , renamed the exe downloaded and run this file ?
thanks
...
LOCAL lRestart := .F. // No restart after closing the application
....
....
// Your Restart-Button somewhere ( activate Restart )
// Action ( lRestart := .T., oWnd:End() )
....
....
ACTIVATE WINDOW oWnd MAXIMIZED
IF lRestart = .T. // Restart is activated
WINEXEC( "RESTART.exe" )
ENDIF
RETURN NIL
// ---- THE RESTART - Application ---------------------
#include "FiveWin.ch"
#define WID 350
#define HGT 200
FUNCTION Main()
local oDlg
DEFINE DIALOG oDlg SIZE 2*WID,2*HGT PIXEL
ACTIVATE DIALOG oDlg CENTER ON INIT ( oDlg:Resize(), RESTART(oDlg) )
WINEXEC( "Myfile.exe" )
RETURN NIL
// -------------------
FUNCTION RESTART(oDlg)
IF MsgYesNo( "Rename and Restart Application ?", " Restart Application " )
DELETE FILE "MyFile.exe"
FRENAME("MyNewFile.exe","Myfile.exe")
ENDIF
oDlg:End()
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 83 guests