X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Front End Automatic Update to New Version    
post Feb 6 2008, 12:32 PM

Posts: 625
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
Folder: “C:\AutoUpdater”
File: YourProgram.mdb
File: YourProgramBE.mdb
Folder: “C:\AutoUpdater\ServerFolder”.
File: YourProgram.mdb (This would be the new version of the program)
File: Installer.mdb
File: UpdateLog.mdb
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.
Attached File(s)
Attached File  AutoUpdater.zip ( 95.27K )Number of downloads: 1442
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    28th May 2020 - 06:29 AM