Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application update
Message
 
À
02/08/2017 06:41:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01652993
Message ID:
01653044
Vues:
68
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform