Auto Updating Frontend WinXP Problem

megamef

Registered User.
Local time
Today, 17:21
Joined
Apr 18, 2013
Messages
161
Hi All,

I'm using access 2003, I have a split database with the back end on a remote PC and seperate front ends on 4 other PCs in my office.

I'm making regular changes to front end (adding features, fixing bugs) so want everyone in the office to be using the latest version of the front end.

Every time I make a change I copy the new front end to the remote location.

To update all 4 PCs I wrote a Batch file which uses XCOPY to copy the latest front end from the remote and replace the front end on the user's PC if the date of the source file is newer. The bat file then opens the access front end.

The user opens the bat file on their PC so each time they open it the newest version is downloaded if the soruce is newer than the destination.

This works on the 3 Windows 7 machines but not on the Windows XP machine.

my bat file code is:

Code:
@ECHO OFF
ECHO Please Wait while latest Database is copied from server
ECHO f | xcopy /F /Y /D "\\REMOTE\Database Trial\Database FrontEnd.mdb" "C:\fe\Database FrontEnd.mdb"
START "" msaccess.exe "C:\fe\Database FrontEnd.mdb"
exit
I know this isn't quite a VBA problem but if anyone can either help me or suggest another/better way to do it, that would be great.

Cheers

Steve
 
Thanks, yes your code does seem to do what I want. I'll wait to see if anyone else has any idea why my batch file isn't working first but if no one can help me I'll certainly give your code a whirl.
 
This is most probably caused as XCOPY in XP does not support UNC-paths. I can't test it from my current computer, but I think it can be solved by using

Code:
@ECHO OFF
pushd [URL="file://remote/"]\\REMOTE[/URL]
cd "Database Trial"
ECHO Please Wait while latest Database is copied from server
ECHO f | xcopy /F /Y /D "Database FrontEnd.mdb" "C:\fe\Database FrontEnd.mdb"
popd
START "" msaccess.exe "C:\fe\Database FrontEnd.mdb"
exit
pushd will create a drive letter to the given server (and prompt will be set to this drive letter)
popd will delete the drive letter

You might need to place popd before the exit-statement
 

Users who are viewing this thread

Back
Top Bottom