Apr 20, 2011 11:22 PM
(This post was last modified: Feb 10, 2012 02:20 AM by idb..)
This one is for you Alex™!
This method of auto-updating is EXTREMELY simple (as you can see from the screen shot). I am reading the current version information off of a text file placed on my server. If the applications current version does not match that of the data in the text file, we assume that there is a new update. If it does match, we assume we have the current version already installed. What I think is pretty nifty about this code is that the old version will SELF DELETE after the new version is downloaded and move it into the place of the old version. This is done via batch file. Why you ask? It seemed the fastest way to handle this process that I could think of. I'm sure that it's unconventional to the way everyone else would do it, but hey... it works!
In the source you will find 2 variables named "pathVersion" and "pathDownload". pathVersion is the URL of the text file placed on your server that contains the version of the updated application. pathDownload is the URL of the actual new file you want to download from the server. I have not included an exe for you to upload to your server or a ver.dat, but it should literally take 2 seconds for you to create them.
Screen shot:
Screen shot was removed and I'm too lazy to make a new one.
Source Code:
http://www.mediafire.com/?lt3akthl4wh49r8
This method of auto-updating is EXTREMELY simple (as you can see from the screen shot). I am reading the current version information off of a text file placed on my server. If the applications current version does not match that of the data in the text file, we assume that there is a new update. If it does match, we assume we have the current version already installed. What I think is pretty nifty about this code is that the old version will SELF DELETE after the new version is downloaded and move it into the place of the old version. This is done via batch file. Why you ask? It seemed the fastest way to handle this process that I could think of. I'm sure that it's unconventional to the way everyone else would do it, but hey... it works!
In the source you will find 2 variables named "pathVersion" and "pathDownload". pathVersion is the URL of the text file placed on your server that contains the version of the updated application. pathDownload is the URL of the actual new file you want to download from the server. I have not included an exe for you to upload to your server or a ver.dat, but it should literally take 2 seconds for you to create them.
IMPORTANT Wrote:Before you build the exe to upload to your server, make sure to increment the current version info (1.0.0.0) to something higher (1.0.0.1).
Screen shot:
Screen shot was removed and I'm too lazy to make a new one.
Source Code:
http://www.mediafire.com/?lt3akthl4wh49r8
Need a custom software? Check out my freelance service here! 6+ years and counting, never a complaint :)
STOP STEALING CODE.
FREE NATHAN
People who report posts are lamers.
STOP STEALING CODE.
FREE NATHAN
People who report posts are lamers.



