All my users have a copy of the front end in Access on the c: drive which connects to a SQL Server backend. The front end is an adp (project).
To update my user's front end from time to time, I wrote some code that checks if they have the most recent version, and if not it copies the new version to the c: drive and runs it. The new version then deletes the old version. This worked well as the new version was always a different filename than the old version.
As per some new developments, my new version needs to have the same filename as the old version, so now I've created a middle file, called transition.adp. The original file sees that the version is out of date, so it copies transition file to the c: drive, runs it, and then exits itself. The transition file deletes the old version, and copies the new version to the c: drive. The transition file then runs the new version and exits itself. The new version then deletes the transition file when it runs.
The problem I'm running into is that after I copy and run a different app, the original app is supposed to close itself BEFORE the different app tries to delete it. This doesn't seem to be happening in time, and I get permission errors as the original app doesn't close quick enough. Same thing happens in the second file transfer.
I never used to have this problem with just the two files, and I'm very perplexed as to why this is suddenly a problem.
Here's the pseudo code for the main app
if version is different
copy transition app to c:
run transition app
exit main app
else
delete transition app if exists
endif
pseudocode for transition app
delete main app
copy new main app to c: drive
run new main app
exit transition app
I'm open to any ideas on how to get this up and running, or a change in philosophy to automate the release of new versions