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 think, happy to be corrected, most people run a 'stub' program on the workstation that compares the full executable
with one in a different location (that no one else runs directly from that location). If it is newer the full executable is downloaded
locally and run, otherwise it is just run locally by the stub program.
In my systems, I have the main program check for the new version, if it's found it runs the stub and quits, the stub downloads
the update to a local temporary location and then copies it over the original .exe and starts that - then the stub quits.
FUNCTION COPY_FILE
PARAMETERS m.FROMFILE,m.TOFILE
PRIVATE m.FROMFILE,m.TOFILE
PRIVATE m.TOPATH
M.TOPATH = MYPATHABOVE(m.TOFILE)
IF !DIRECTORY(m.TOPATH)
MD (m.TOPATH)
ENDIF
COPY FILE (m.FROMFILE) TO (m.TOFILE)
RETURN(MYFILE(m.TOFILE))
I have a copy_file function:
Code:FUNCTION COPY_FILE PARAMETERS m.FROMFILE,m.TOFILE PRIVATE m.FROMFILE,m.TOFILE PRIVATE m.TOPATH M.TOPATH = MYPATHABOVE(m.TOFILE) IF !DIRECTORY(m.TOPATH) MD (m.TOPATH) ENDIF COPY FILE (m.FROMFILE) TO (m.TOFILE) RETURN(MYFILE(m.TOFILE))
The MYFILE() in there is just my own File() to avoid false positives.
MyPathAbove() just returns the folder above the target, there is a vfp function for that too.
This is good for local networks, where you can do a copy.
If I want to check online, I use a westwind module to download the executable after checking a 'signature file'
which has the time and date of the executable.
I would suggest an endpoint manager system.
For example : desktop central from Manage engine. (not a sponsor)
You install an agent and you can do ANYTHING on that endpoint.
Including the updating said executable ( via some push on script)
Its free but you cna pay for it.
Let me know what you come up with.
Thanks
Unless. If the pcs are in the same network.Wow. It's up there in the food chain alright. That's kinda like having a Lamborghini to deliver newspapers in a neighborhood. Thanks for pointing this to me. This is perfect for a company with a sizable IT inventory.
I simply needed a simple way to update EXEs across multiple workstations.
Unless. If the pcs are in the same network.
And execute said exe from a shortcut from a network location.
You change at a single position, it changes everything, everywhere.
Think about it
One method I particularly like for the scenario where the exe is on a network share and the users run the application over the network is to use a simple launcher methodology:
1. Make the main exe that the user executes from their shortcut (or whatever) a miniscule launcher, the job of the launcher is to determine a local folder on the user's workstation to copy any necessary files (apps, other exes, flls, dlls) from the network location to the local folder, perform the copy and proceed to launch the rest of the application
2. Each time the launcher is executed it will compare the versions of various files on the network against the version in the local folder and copies to local, any files that are missing locally or they are newer on the network are copied. Yep, just doing a COPY FILE for each file.
3. As an example, the local folder on the workstation would be something like: c:\Users\<username>\AppData\Local\<CompanyName>\, the base of that path taken by asking the OS for the path to that AppData\Local special folder path.
4. When the compare/copy job is complete, the launcher then runs the main app (or Exe) specifically by running the local copy, not the networked instance. When run in this mode the local app (or exe) still knows how to access the data on the network, whether that is DBFs on a share or from whatever database server, if applicable.
5. This means that the launcher exe will always ensure that the user has the latest version of everything it needs in the local folder on their workstation and then launches the main application. Users can be sure that they are on the latest version of the application simply by restarting the application because doing so will cause the launcher to do it's job again.
There are some nice advantages of doing this, in this scenario:
a) The network folder becomes a repository for the latest application files rather than somewhere that users are running the application from. In fact, the only exe or anything that anyone actually executes from that folder is the tiny launcher exe.
b) This also means users are putting less load on the network because no matter what size the main application is, a tiny launcher will almost certainly be significantly smaller than any main exe. That might not be a big issue in places where they have small numbers of users or an good/fast network but it's still an advantage, especially if someone is running on a slower network or has a very large number of users.
c) Since the network folder is now only a repository, no user should have your main app (or exe) locked because no user is actually running it from that location, this means you can easily update that main file through whatever means you want or install new versions alongside, it depends on how you want to manage your new versions.
You could then code your main application to know how to download new versions of the application from your website, SFTP, FTP (whatever applies) and download it specifically to the network folder (repo). This means the application can be used to very easily keep itself up to date. When a new version has been downloaded and put in place in the network repo, restarting the application is all that is required for any user to "be on" that new version because the launcher will replay it's logic, copy the new version to the local folder and run the application on the new version.
If your application can keep itself up to date, either automatically or through user intervention, then the only thing you need to factor in is if you have to do database migrations (DB schema updates) and how you do that is very much dependent on what your database is. Anything on a database server (like SQL Server, MySQL and many others) is usually much easier to perform the schema updates than if you are using shared DBFs.
I followed this on a pattern on a 25+ year old application which used a DBF database and it meant updating the application became significantly easier. By doing so I reduced our main exe from being in the 13 to 15 MB file size, to around 100KB and to be honest, the lion's share of that file size was due to the exe icon, the actual code size was laughably small. Obviously that other 13MB got moved to the app (in our case) but that was no longer being "run over the network", it would be copied to each workstation, only once plus on any future updates. After doing that, I just had the headache of the database schema issue. The DBF problem meant that I could never assume that the database wasn't in use by at least one user so I couldn't have the application try to do a DB migration itself, I resigned myself to running DB updates semi-automatically, for peace of mind really. If that application had used a DB server, I would have done auto DB updates but I didn't dare with DBFs, there was too much at stake.
I made my application version number schema know the difference between major version updates and minor version updates. Major updates are those that required a change to the DB schema, minor updates required no schema updates. So I coded my application to be able to do minor updates automatically but major updates had to be more formal. For example, if the user was on version 24.138.4 and version 24.138.32 was available (only the last element had changed) the user can do that themselves, without support from us as the difference between .4 and .32 within the same 24.138.x edition meant no DB schema changes required. Even if 24.139.x versions would be available, the application could request to be updated as high as it can go within the same edition. That kept things simpler for me.
If I then updated that user to, say 24.139.3 and a few weeks or months later 24.139.4 was available, the users could trigger that update themselves. I think the pattern is clear enough. The second element in that version number (the 138, 139 etc) that was the number of my migrations (DB schema update routines) so that made it easy for me to keep track, as well as recording it in the database, which migrations the installation had gone through.
I even coded the launcher to check for new versions of itself, as well as the main application, just in case I needed to update the launcher and didn't want to have to kick users out. The user's shortcuts would always look for the same filename, auction.exe but I could drop a new launcher version, specifically named so the first thing that the launcher did was check for anything matching the specific skeleton and, if found, check which is the latest version so if it found one that was newer, it would "Shell Execute" the newer version and let itself come to a close, the newer version would then take over and do what it needed to do with the application aspect.
I've maybe gone much deeper in my response than just describing the launcher methodology that we settled on but the above gives a lot of detail on how we managed to greatly simplify version updates, given that we still had one major awkwardness by still using DBFs on a file share. In the end we arrived at a place where I could build new versions, manage the version numbers correctly, push the new zip files online and our application would keep the users correct. They could update themselves within their own "edition" or "parent version" and bigger updates required us to help with a more formal update process but that still drastically reduced the amount of time I spent updating users versions. Having the network folder act as a repository rather than the main launch folder (other than for the launcher itself) meant we never had to update individual users within any given company, we'd just put the new version in the central folder and the launcher and application would take care of everything else. If we'd gone through the pain of replacing the database with something that didn't use DBFs then I'm confident that we could have moved to a 100% fully automated way of updating users, it was only the DBFs that were holding us back.
You should not revive an old thread, even for illustrating you already found one old thread on this, you can link to that in a new thread. Reviving old threads most of the time leads to less participation.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.