Mitsules, Mark S. (Newport News)
Mark.Mitsules at ngc.com
Wed May 5 17:00:48 CDT 2004
>> Using a file name suffix means that it is not necessary to actually open
the file to check the version and it might have been more efficient to
simply do the same for checking the existing FE <<
Jürgen, I followed your advice somewhat. Currently I am thinking of NOT
deleting the old FE if/when I do an update. My thinking is that with a
single record change, I could instantly revert back to a previous version
if, God forbid, the new FE crapped out. My question is this...how would you
mitigate the version rollover problem?
Group, any comments regarding the approach I've used? No comments included,
but hopefully the naming convention suffices as an explanation of what is
going on.
(see code below...watch for line wrap)
Mark
*** BEGIN CODE ***
Select Case fFolderExists(constInstallPath)
Case True
Select Case fFileExists(strCheckFileName)
Case True
If fShellExecute(strAction, strFileName, constInstallPath)
Then
'Application.Quit
End If
Case False
If fToggleFolderAttributes(constInstallPath) Then
If fCopyFile(strSource, constInstallPath) Then
MsgBox "Installation complete.", _
vbInformation, "Database Installation"
If fShellExecute(strAction, strFileName,
constInstallPath) Then
'Application.Quit
End If
End If
End If
End Select
Case False
If fCreateFolder(constInstallPath) Then
If fToggleFolderAttributes(constInstallPath) Then
If fCopyFile(strSource, constInstallPath) Then
MsgBox "Installation complete.", _
vbInformation, "Database Installation"
If fShellExecute(strAction, strFileName, constInstallPath)
Then
'Application.Quit
End If
End If
End If
End If
End Select
*** END CODE ***
-----Original Message-----
From: Jürgen Welz [mailto:jwelz at hotmail.com]
Sent: Monday, May 03, 2004 12:29 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Deployment Woes
In the bad old days my former employer had serious security restrictions
that prevented running any number of different kinds of files including
batch files. No user could create a shortcut so I had to make to with the
one that was given to all users. Unfortunately I needed the shortcut to run
each users own FE version of the file, especially as they moved to Terminal
Server and I had Word automation issues with multiple users running the same
FE. My solution was to convert the mde file that the shortcut pointed at to
a file that determined the logged in user, used that information in the file
path to that user's unique FE, check a custom database property named
"UserVersion" which was a number from 0 to 9, compare that property with the
master FE filename (which had a single digit suffix in the name). If the
property matched the suffix, it launched the FE, otherwise it copied over
the new version and launched it.
Deployment required a few simple steps:
1. Make changes to a development file;
2. Update the version property of that file;
3. Set the file suffix;
4. Copy the file to the deployment location;
5. Delete the previous file.
This approach only copies new versions when they are available. Using a
file name suffix means that it is not necessary to actually open the file to
check the version and it might have been more efficient to simply do the
same for checking the existing FE rather than opening a database object to
check the UserVersion property I created.
I have used schemes based on checking the file creation date with an API
call for the date but found that simply changing a version number from 0 to
9 and back to 0 kept it very simple. You can simply start the version
number from 0 as the test is for version match and not highest version
number. Now that I look at it years later, the only reason for using a user
version property rather than a file name was because the users might change
the file name extension manually and because users commonly copied the FE to
laptops and this obviated the need to change the name of the coped file.
Simply checking for a filename is significantly faster than opening a
database and checking a version property and some day I may just change it
to do that only.
BTW, the system automatically creates the folders if they don't exist and
copies over a file if it didn't exist as well. New users are autmatically
accomodated.
Ciao
Jürgen Welz
Edmonton, Alberta
jwelz at hotmail.com