Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application update
Message
 
To
02/08/2017 06:41:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01652993
Message ID:
01653044
Views:
69
I make a exe from the following code which works well for updating across a network. The user starts this program which checks file versions updates if needed then starts your program. Just need to make sure they always run from this not the actual program.

SET TALK OFF
SET SAFETY OFF
** Check can access network by looking for a file ( I map to x: )
IF !FILE("x:\somefile.dbf")
MESSAGEBOX("Network not connected",48,"Warning")
QUIT
endif

** Compare file version on network with local file and copy if different
lsexe = "x:\yourprog.exe"
ltexe = "yourprog.exe"
AGETFILEVERSION(tarr, ltEXE)
AGETFILEVERSION(sarr, lsEXE)
IF tarr[4]#sarr[4]
COPY FILE &lsEXE TO <EXE
endif


RUN/N1 <EXE && run the program as separate process

IF ".EXE" $ SYS(16)
QUIT
ELSE
Cancel
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform