xzaz Posted January 4, 2008 Share Posted January 4, 2008 (edited) So i got my own program but i release updates (read: new versions) of my program on the internet. So people can download the new versions. Now i want to make a function to check if there is a new update. I got this now: 1. With inetget i get a ini file from the internet, read the version number. 2. If the number is higher then the version on my local PC. Then close the program and run update.exe 3. Update.exe, downloads the new version. Deletes the current version on the client and runs the new version. This is ok when i got 3 a 4 files. But later when you got more files how do you do that. I was thinking about just a ZIP file to unpack it. How did you made your update function? Edited January 4, 2008 by xzaz Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
rasim Posted January 4, 2008 Share Posted January 4, 2008 Hello!For easy and literate define use MD5 for compare files checksum.Example:$objMD5 = ObjCreate("XStandard.MD5") $var1 = $objMD5.GetCheckSumFromFile("d:\prjct\02_3.JPG") $var2 = $objMD5.GetCheckSumFromFile("d:\prjct\023.JPG") If $var1 = $var2 Then MsgBox(64, "Checksum", "Files are identical!")Good luck Link to comment Share on other sites More sharing options...
xzaz Posted January 4, 2008 Author Share Posted January 4, 2008 Tnx for your reply. Thats a file checking that i didn't used, tnx for the suggestion. But is it so that, when i updated my script to a lower version the files are not identical and will be overwrited by a lower version? Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
xzaz Posted January 5, 2008 Author Share Posted January 5, 2008 Is this the best way to update the program? Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
DirtDBaK Posted January 5, 2008 Share Posted January 5, 2008 I do it a different way... InetgetSource() use this to find the text in a text document on a web site then compare that version with the one of the program if the programs is older then use Inetget() to download a temp file of your source. Use file move to move your temp file to the file of your actual appliaction with the overwrite turned on. Hope that helps, Hint, you will need two programs one will do the filemove because you cannot overwrite a exe that is in use. [center][/center] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now