I have used 2 different methods of updating my programs.
Both the methods copies all the files from one directory into the application directory, overwriting old files. It then launches the program with the -updated parameter so the program can notify the user.
So the two different methods are these:
Code:1. Generate a batch script that kills all processes named the same as my app.exe, then executes this line "move /Y tempdir\* applicationdir" and at last it launches the application again with the -update parameter so the program can delete the batch and the vb script since they are in the same folder as the application. 2. Generate a vbscript that runs that batchscript invisbly (so the user doesn't notice anything)Which is the best/cleanest, or do you have a better method?Code:1. Pass the tempdir along with application dir and application name to AutoUpdate.exe 2. That program launches, terminates my app, then moves the files in the tempdir to the application dir, overwriting everything. 3. It then launches my app with the -updated parameter.![]()




Reply With Quote