New Version of Program updates

I have a program that I am maintaining, and periodically there are changes made and the program is recompiled.  I have a default location on our network were the new version is posted so that everyone using it can update their local computer.  I am looking for a way to automate this so on exitting the program if there is a new version it needs to be copied down to their local machine.  I have a routine that checks to see if the version on the network is newer that the one currently running that works fine. I have another program that will copy the file to the correct location, but I cannot figure out how to execute this program from with in the one currently running.  I could make this process a compiled dll but that would require installing it on all the computers that are currently running the software.  I was hoping to start copy program in the MDI form unload event so that once the program copy program starts the program will exit so that the copy can take place. Any ideas??
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Put the version checker in the unload statement of the application.  If the version on the net is newer then shell the copy  routine locally.  reinforce the copy routine to check whether the application has closed down if not then forcibly close it or alternatively poll until it has unloaded. Once the application has shutdown then copy the new version and then close down the copy application.
open "overw.bat" for output as #1
print #1,"copy s:\server\prog.exe prog.exe"
print#1, "del overw.bat"
close #1

shell "overw.bat"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
In more thourough form

Private Sub Form_Terminate()
Dim date1 As Date
Dim date2 As Date
Dim sAppPath As String
Dim sUpdatePath As String

'Examples only
sUpdatePath = "c:\prog.exe"
sAppPath = "a:\prog.exe"

date1 = FileDateTime(sAppPath)
date2 = FileDateTime(sUpdatePath)

If date2 > date1 Then
    Open "overw.bat" For Output As #1
    Print #1, "copy " & sUpdatePath & " " _
     & sAppPath
    Print #1, "del overw.bat"
    Close #1
    Shell "overw.bat"
End If


End Sub
drg22Author Commented:
I am sorry but I tried that and it didn't work, but I was able to get the answer from Kurvy to work though.  If Kurvy would like to lock the question I will reward the points. Thank you for the response Deighton.
drg22Author Commented:
The comment added by Deighton is worth some points I didn't see the second comment before. I added my comments if you relock the question I will award the points. Thanks again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.