Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I never do this. The EXE, the runtimes, and the data are on the server. The user just has a shortcut on their desktop to a Launcher.EXE program on the server (the user never runs the actual program directly). Launcher just runs the latest version of the program (also on the server, as mentioned). If the program is called MyProgram, I'd put in MyProgram001.EXE when first installed. If I modify the program, I just drop in MyProgram002.EXE. Launcher just looks for the latest version of MyProgramNNN.EXE (using the number, not EXE date/time) and runs that. So to run the latest version, the user simply needs to exit the program and restart it (immediately, in the case of important fixes, or at their leisure when the update is not critical). If I need to do a data structure update, I have a way of forcing the users out and keeping them out until I'm done.Hi Guys,
I know this has been discussed. I would just like to get your various methodologies in doing EXE updates across multiple workstations using the app so I can decide on which to adopt.
Thanks in advance.
I have a way of forcing folks out. They are notified and can save their data (or not). If the elapsed period of time expires before forced shutdown, any changes are reverted and the program shuts down. It's not perfect - I probably need to do some refinement - but generally works well.A little thing about letting 10 users run an executable from the network at the same time... you have to get all 10 to exit the application
in order to update it. Try that a 2pm on a Friday before a public holiday...
dylim,
to summarize, there are many aspects you need to think about which makes updating seem like an impossible task, but you could easily start with something that's working based on only comparing a local version.txt file with version.txt in an update directory and when the update version.txt value is pointing out a later version execute an update.cmd batch file that does the necessary steps to update. That's perhaps the simplest way to handle updates which also automatically does nothing, once the update has updated the local version.txt to contain the same version number as in the update directory. And think about cases like users keeping an EXE running or other special cases later.
Hi,
I'm using a VBS-Script starting my EXE. The script ist comparing the file-date of the exe-file (new and existing) and (depending on the date comparison) copiing the new exe-version and starting or just starting the existing exe.
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
datei_netz = "S:\xxx\yyy\planung.exe"
datei_loc = "C:\aaa\bbb\planung.exe"
Set oFile_Net = oFSO.getfile(datei_netz)
Set oFile_Loc = oFSO.getfile(datei_loc)
'DateCreated?
Date_Net = cdate(oFile_Net.DateLastModified)
Date_Loc = cdate(oFile_Loc.DateLastModified)
if datediff("n",Date_Net ,Date_Loc) < 0 then
' msgbox("Daten ungleich")
ofso.copyfile datei_netz, datei_loc
else
' msgbox("Daten gleich")
' ofso.copyfile datei_netz, datei_loc
end if
WshShell.CurrentDirectory = "C:\aaa\bbb\"
WshShell.Run("C:\aaa\bbb\planung.exe")
Christoph
Hi Dylim,
The script shown is running as a VBS-file (e. g. Start_planning.vbs) outside of the Vfp-Exe.
All users have this Script on their PC. I only copy a new version in the network-folder and the Script is doing copying and starting the exe.
There's a very simple rule why people here talked about a separate loader.exe or a cmd batchfile or a vbs script file doing the actual EXE updating: When an EXE runs Windows protects the file and does not allow overwriting it, so an update always has to happen in separate code, be it another EXE or a command file. There's little concern about performance, this is the major reason.
You can try yourself, with an even simpler test of trying to BUILD an EXE from your VFP project while the EXE from a previous build runs, the final step to overwrite the EXE will then fail.
So you always need something separate. A vbs script or batch file has the simplicity to be adaptable variing situations not only by you but by network admins, anybody else from the customers (or your own companies) IT department or devops knowing enough about Windows shell commands.
Hello Chriss,
exactly this is the (will known) reason why...
Explanation from Chriss (very good):
<<There's a very simple rule why people here talked about a separate loader.exe or a cmd batchfile or a vbs script file doing the actual EXE updating: When an EXE runs Windows protects the file and does not allow overwriting it, so an update always has to happen in separate code, be it another EXE or a command file. There's little concern about performance, this is the major reason.>>
Best regards