Dear Joe, This is my aproache to this matter you people are discusing, and I thought this is the way must of the programers use.
I Have 2 Setup Files :
1. Server installation. This one containes all the DBCs, Tables and
Free Tables the system will need to run properly. all the Exe files of
your App and.. the Runtime Files of VFP.
of curse
2. WorkStation Installation. This only will install the Runtime Files, all
the Exe files of your App. and an Ini File
in the ini File you have to put all the network addresses that you need e.g
*:YourApp.Ini
[Directories]
ServerDir=\\ServerName\SharedName\YourAppFolderName
DataDir =\\ServerName\SharedName\YourAppFolderName\YourAppDataDir
TempDir =c:\Temp
LocalDir =c:\YourAppLocalFolder
AnyThingElseYouCouldNeed=NONE
you make a little Exe name whatever you want lets say
Loader.exe
this loader has to be included in te workStation Setup and the setup will have to create a shorcut in the desktop to run the Loader.exe
In the loader.exe code you compare the time stamps of the local File lets say
c:\YourAppLocalFolder\Main.exe
against the Server exe file, lets say
\\ServerName\SharedName\YourAppFolderName\Main.Exe
if the date and time of the local file are older the proceed to copy the server exe to the localDirectory. How the loader knows all this info
well, you have to read the ini file first and the handle the vars inside your code, something like
vServerFile = ServerDir + [main.exe]
vLocalFile = LocalDir + [main.exe]
lets say that we do all the work to get the time and date of creation of both file and have two var with it
if TimeDateOfTheSeverFile > TimeDateOfTheLocalFile then
copy file (vServerFile) to (vLoclaFile)
endif
after the update then you run the main locally. Yuo will have better performance.
How your forms know where are the Data and tables
ind the DataEnvironment BeforeOpenTables event you will have to change the database for all your cursor using the dataDir var initialized in the ini file
something like
this.YourCursorName.database = DataDir + [YourDbcname.Dbc]
this is how I do it, and you don't have to take care about the updates for your users because you just drop the new version in the server dir and when the client rund the program locally the loader.exe will check the date and replace if necesary
regards
Selim
.......
DO WHILE .T.
ME.Work()
ENDDO