Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP.exe to different VFP.exe
Message
From
19/02/2021 11:35:45
 
 
To
19/02/2021 10:56:50
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01678195
Message ID:
01678450
Views:
52
>>>>>>>>>MS intent is to have the main exe launched directly. Updates would be a separate thing. Anyone have alternative suggestions?
>>>>>>>>
>>>>>>>>Mike, I don't know if this can be of help, but in our setup the launcher is the sole executable. The equivalent to your "legacy app" is really a Fox app, so the process that is running in the system is the launcher.
>>>>>>>
>>>>>>>How do you update the executable of either the launcher of the legacy app? I did think to send out an email with a link.
>>>>>>
>>>>>>That's basically what we do, Mike. In our case, the local sysop is notified of the availability of updates, download the files, put them in a deployment folder in their LAN, and the launcher will perform the update of the app.
>>>>>
>>>>>We do the same. Does the user start the launcher which then starts the app OR is the new app put onto the user's PC which the user actually starts?
>>>>
>>>>The user starts the launcher. The application is a real Fox "app", as I mentioned above. It isn't executable by itself.
>>>
>>>So the users see the launcher on their desktop, and then the app in the taskbar? If they had pinned the launcher to the taskbar, 2 icons right? This our users find confusing after so many years where the launcher does not release itself when the app starts.
>>
>>I did not like the idea to have a separate program running the actual program, because the shortcut would not point to the same file that the distribution would install. Sometimes the client would think the shortcut is pointing to a wrong file and he would create a shortcut to the actual program, and then it would never upgrade. Also some users start the program from the program folder itself by double clicking the executable.
>>We solved that by integrating the launcher in the main executable and it would then upgrade itself. So there is only one exe and the launcher is hidden in the program which the user or admin never sees.
>
>How - if the main exe is running, you'd have to exit the thing that is trying to upgrade itself. :)

The "itself" part is from the user perspective :)

At startup the program checks for a new version, and if found, copies it into a temporary folder locally (to make the final move faster). Then it extracts the launcher to temp and runs the launcher and quits itself. The launcher shows some UI, loops until it can lock the exe, then deletes the exe and moves the downloaded version and restarts the exe.
The launcher is a small VFP exe, but to include it into the exe rename the extension like launcher.dat:
lcPath = FORCEEXT(FORCEPATH(SYS(2015), GetEnv("temp")), "exe")
STRTOFILE(FILETOSTR("Launcher.dat"),lcPath,0)
! /N &lcPath
QUIT
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform