![]() |
|
[.NET] [TUT] Real Update System (auto-check, auto-install) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] [TUT] Real Update System (auto-check, auto-install) (/showthread.php?tid=1069565) |
[TUT] Real Update System (auto-check, auto-install) - ManDoR - Feb 18, 2011 Hey everybody ! I've seen a lot of people that asked for an update system... I've seen some system, but not really working... So I give you mine :) It's not optimized, so if you have comment, please post ! :) So here is the tut : First, I explain you how it works : The system check the content of a file that is in your database : the number of your new version. If this number isn't equal as the version of the program, it opens the update form. In this form, there is a button, that when you click on it, save the content of the file where is saved the number of the newest version, and download it in your server. So you have to name your newest version same as the number that is in the file on your server ! After that, it UnRAR it, and install it... Code for your main form, that check updates : Code Public Sub check_update()Code for your update form, that download and instal update (you need UnRAR.exe in the same folder of your app ! download : here): Code Public last_version as stringHope it will help you... PS: Sorry if there are any french languages, I'm french :p * - ManDoR - Feb 19, 2011 Bump ! It's not helping ?? * - E.T - Feb 19, 2011 Good, but there is a lot of source like that, but thank's you :D * - ManDoR - Feb 19, 2011 (Feb 19, 2011 04:04 AM)E.T Wrote: Good, but there is a lot of source like that, but thank's you :D Thanks for reply :) i know there are a lot of source like that, but it's not the same system, and they haven't the code for extract a *.rar archive :) * - xCocaine - Feb 19, 2011 (Feb 19, 2011 04:04 AM)E.T Wrote: Good, but there is a lot of source like that, but thank's you :D Well, its the first time i see an example with webrequest... Here all snippets are like download & run . * - This Girl Is On Fire - Feb 19, 2011 The fact that it uses UnRar put me off. * - ManDoR - Feb 19, 2011 (Feb 19, 2011 06:39 AM)xCocaine Wrote: Well, its the first time i see an example with webrequest... Thanks ! (Feb 19, 2011 09:06 AM)Zevilone Wrote: The fact that it uses UnRar put me off. It uses UnRAR just because it's an example of how to auto-install an archive ! * - TraptCode - Feb 26, 2011 xSilent has a better tutorial on this, maybe you can watch his videos and improve your code. * - ManDoR - Feb 26, 2011 His tut doesn't show how to Unrar... It's a simple tut to show a method... you can improve it like you want, but it works fine for me * - *.dll - Aug 20, 2011 Ok guys i think this cant work since when it needs to extract update into a startup folder it will show error: file is already in use this only can work if you make 2 projects and you use process.start (application) and process.start (update) when update is closing you need to call this command process.start (application.exe) and me.close... I think thats only solution or you can change name of application i think that will work too but i dont guess anything... * - Coleak - Aug 20, 2011 This code has been posted on multiple websites. Example: http://www.vbforums.com/showthread.php?t=643189 Quit leeching please... * - asad3man - Aug 20, 2011 Close this thread, cz this thread is gonna flame of fire,and flame of users xD * - g1ll1s - Mar 11, 2012 I have tried this, but it cant simply compare the .txt file on the server to a label. It just does the code that comes before the "else". Like it cant compare the two strings correctly and tell that they are not equal to eachother. Anyone know what might be going wrong? |