Bob Gajewski
bob at renaissancesiding.com
Mon Apr 14 09:35:19 CDT 2003
Lembit A great idea, of course! I was referred to the following batch file, and have been using it (with slight personalizations) quite successfully. This is for Access 97, but can be easily modified. Regards, Bob Gajewski On Monday, April 14, 2003 10:07 AM, Lembit Soobik [SMTP:Lembit.Soobik at t-online.de] wrote: > one alternative is to put a little batch job on each worstation that copies the > FE from the server to the workstation. this will give you two advantages: no > bloat of the FE, since you always copy the fresh FE, and updating FE is easier > (only one location) > Lembit > > Lembit Soobik > WARNING: WATCH FOR LINE WRAP IN YOUR BROWSER =================================================== REM A batch file to update a MS Access database then run it under a secure workgroup REM by Keith Harvey 09/2000 - harvey at hunterlink.net.au REM **** USER ACCEPTS ALL RISKS WHEN USING THIS BATCH FILE **** REM **** STOP MESSAGES, CLEAR SCREEN, KEEP USER INFORMED **** ECHO off CLS ECHO. ECHO Starting Your Front End. Should only take a few seconds ... ECHO. REM Note that the variables and the batch file name MUST be customised for each database REM ***** ABOUT THE VARIABLES ******. REM PGRM is the variable for the file name of your current Front_End.mdb. REM When updating the version of the Front End simply change PGM and resave the batch file REM (Note: PGRM must also fit the LOCDEL naming pattern below so old versions delete OK.) REM LOCDIR is the directory on the Client PC that will hold the working version of PGRM REM LOCDEL is the pattern of files to delete in LOCDIR if the latest version REM of PGRM can't be found (Note that the value of LOCDEL is case sensitive) REM (Vital Note: TRIPLE CHECK the items you assign to LOCDIR and LOCDEL. Delete is REM VERY unforgiving. NEVER EVER set LOCDIR to just C: or LOCDEL to *.*) REM MSACC is the dos path to MS Access on the local PC. REM SRVDIR is the directory on the Server to get the latest version of PGM from. REM WKGRP is the location of the access secure workgroup to use. (Note. Leave WKGRP blank REM if you are using the standard MSAccess work group) REM ***** THE VARIABLES ***** set PGM=yourdb.mdb set LOCDIR="C:\Program Files\Microsoft Office\Office 8.0\Office" set LOCDEL=yourdb.mdb set MSACC="C:\Program Files\Microsoft Office\Office 8.0\MSACCESS.EXE" set SRVDIR="f:" set WKGRP=/wrkgrp "\\srvdir\System\yoursystem.mda" REM ***** COPY YOUR CURRENT FRONT END TO THE PC CLIENT ***** REM Check if the local directory LOCDIR exists, if not then create it. REM If current version of PGM does not exist in LOCDIR then: REM 1. Keep the customers happy! REM 2. Delete any old versions of PGM from LOCDIR, REM 3. Copy the new version of PGM to LOCDIR if not exist %LOCDIR% md %LOCDIR% if not exist %LOCDIR%\%PGM% echo Updating to the latest version of %PGM% ... if not exist %LOCDIR%\%PGM% del %LOCDIR%\%LOCDEL% copy %SRVDIR%\%PGM% %LOCDIR%\%PGM% /D if not exist %LOCDIR%\%PGM% xcopy %SRVDIR%\%PGM% %LOCDIR%\%PGM% REM **** FINALLY, START THE LATEST VERSION OF THE FRONT END ON THE PC ****** START /MAX %MSACC% %WKGRP% %LOCDIR%\%PGM% REM **** CLOSE THE MSDOS WINDOW **** cls