Front End Automatic Update to New Version
Feb 6 2008, 12:32 PM
Joined: 27-February 03
From: Central California
There is an AutoUpdater.mdb program posted here that updates front end programs, but you have to open that program to run the updates. I wanted to automatically update a user’s front end program from within the front end when I place a new version on the server. Attached is my solution.
o run the demo place the attached files into these folders
File: YourProgram.mdb (This would be the new version of the program)
Open YourProgram.mdb in C:\AutoUpdater. A login form will appear. The users and passwords are located in table “tlkpUsers” which is located in the back end program “YourProgramBE.mdb”. When the user logins in a splash screen opens (frmSplash) and runs code that checks to see if the users FE is in sync with the FE that is on the server (C:\AutoUpdater\ServerFolder). If they match the main menu opens. If they don’t match an install program (Installer.mdb) opens, which would be located on the server, the users login name and password are transferred to the Installer program, and the user’s FE is closed.
After a 3 second timer (to insure the users FE has had time to close) the Installer copies a new FE to the user’s computer, logs the activity and then opens the newly updated version of the FE on the user’s computer using the transferred login name and password.
To test, change the value of the field “version” in table “tblVersionNew” located in C:\AutoUpdater\ YourProgram.mdb, this will trigger a new installation when the user logins in again.
The main assumption needed for this approach to work is that the FE and the Install files are located in specific locations on the user’s computer and the server respectively. Look at the code and you will see the constants that need to be modified in frmSplash (located in YourProgram.mdb) and frmInstall (located in Installer.mdb) in order for the program to work with your locations.
I have also used this approach with “mdw” secure programs. Code modifications need to be made to open the new FE like:
strCmd = SysCmd(acSysCmdAccessDir) & "\MSAccess.exe " _
& "C:\YourFolder\YourProgram.mdb" & " /wrkgrp " & "F:ServerLocation\SecurityFile.MDW"
Call Shell(strCmd, vbNormalFocus)
DoEvents: DoEvents: DoEvents
This approach has made it easy for me to release new versions of FE's. Users don't have to do anything and it guarantees that all users of the progam has the most current version.
AutoUpdater.zip ( 95.27K )Number of downloads: 1104
|Search Top Lo-Fi||25th November 2015 - 11:14 AM|