Results 1 to 3 of 3
  1. #1
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616

    Post [Tutorial] Auto Updater[Reopen]

    This will get the current version info from online.


    Form1 Load

    [php]

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    WebClient1.DownloadFileAsync(New Uri("https://blahblahblah.com/version.txt"), "version.txt")
    End Sub
    [/php]

    This compares the current version info to the version of the program. If it is lower than the current version info from online, it will try to get the download link of the program.


    WebClient1_DownloadFileCompleted

    [php]
    Private Sub WebClient1_DownloadFileCompleted(ByVal sender As System.Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WebClient1.DownloadFileCompleted
    Dim Read As String = My.Computer.FileSystem.ReadAllText("version.txt")
    If Not Read = Application.ProductVersion Then
    'If it reads blank, then the internet connection is faulty.
    If Read = "" Then
    MsgBox("ERROR: Please check your internet connection, check the website, or try later.")
    Else
    Msgbox("Downloading!")
    WebClient2.DownloadFileAsync(New Uri("https://blahblahblah.com/link.txt"), "link.txt")
    End If
    Else
    Msgbox("Program is up to date")
    End If
    End Sub
    [/php]

    This will read the download link and it will direct the web-browser to it.
    WebClient2_DownloadFileCompleted

    [php]
    Private Sub WebClient2_DownloadFileCompleted(ByVal sender As System.Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WebClient2.DownloadFileCompleted
    Dim Link As String = My.Computer.FileSystem.ReadAllText("link.txt")
    WebBrowser1.Navigate(Link)
    End Sub
    [/php]

    The use of a link.txt is that if you upload different versions, the download link might change so the program will fetch the right one from the text file.

    If you want to update, edit your version.txt (1.0.0.0 -> 1.1.0.0) and provide a download link in link.txt. You will need to find somewhere to host the files but you also have to sure that the url never changes. I use webs to host the text files since the url will always be.

    Also, you can edit the text with out re-uploading. An alternative is Spam.

    NextGen1: User Provided sufficient evidence that the original poster on another site and noob are one in the same.
    Last edited by NextGen1; 04-11-2010 at 10:11 AM.

  2. The Following User Says Thank You to NOOB For This Useful Post:

    Steve323 (05-27-2010)

  3. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed


    Thank You For Sharing.

    Also, as of Vb.net 2005 ( I don't remember if 2003 had it or not) Auto Updater source
    became "Obsolete". It was replaced with Click Once and the built in function which made
    it easy, and there is no need for this extra code.

    Last edited by NextGen1; 04-11-2010 at 10:17 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  4. The Following User Says Thank You to NextGen1 For This Useful Post:

    Steve323 (05-27-2010)

  5. #3
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    Nice job, but there are a lot of tutorials about this..

  6. The Following 2 Users Say Thank You to Invidus For This Useful Post:

    Steve323 (05-27-2010),technologicpunk (04-10-2010)

Similar Threads

  1. Auto-Updating Addresses
    By OneWhoSighs in forum Game Hacking Tutorials
    Replies: 4
    Last Post: 04-29-2013, 06:10 AM
  2. [VB.NET]Auto Updater [Tutorial]
    By Hawk_ in forum Programming Tutorials
    Replies: 19
    Last Post: 11-12-2010, 05:11 AM
  3. [TUTORIALS] How to auto-update addresses even after patches
    By J in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 19
    Last Post: 09-23-2010, 06:28 AM
  4. Auto-update adress D3D
    By LinkIII in forum Programming Tutorial Requests
    Replies: 0
    Last Post: 11-05-2008, 03:24 AM
  5. [Please Help] Auto-Updating
    By twistedswift in forum Hack Requests
    Replies: 0
    Last Post: 08-01-2008, 10:59 AM