Results 1 to 8 of 8
  1. #1
    snotpig's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Under ur bed.
    Posts
    95
    Reputation
    10
    Thanks
    28
    My Mood
    Bored

    [Help]Auto Update

    I am making a complex program hopefully to be released in the near future. (Intentionally evasive) In my program I have a 'check for updates' menu tab that opens a new form. On this form i have a single button, which when pressed downloads a text file from the server.

    This code has no errors as I can see it just doesn't do what i want...


    Code:
    Private Sub WebClient_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WebClient.DownloadFileCompleted
            MsgBox("Checking complete")
            readit.Text = My.Computer.FileSystem.ReadAllText("Version.txt")
            If readit.Text.Length > 7 Then
                Downloadfile("https://www.MyServer.com\Version.txt")
                Exit Sub
            End If
            Dim updatedVersion As Double = Val(readit.Text)
            Dim currentVersion As Double = Val(Application.ProductVersion)
    
            UVer.Text = readit.Text
    
            If updatedversion > currentversion Then
                MsgBox("New Update Avalible!")
                System.Diagnostics.Process.Start("https://www.UpdateSite.com")
            Else
                MsgBox("No Updates Avalible")
            End If
        End Sub
    When the code is done,
    currentVersion = 1.0 , where in the project assembly it is 1.0.0.0
    updatedVersion = 5.0 , where in the text file it is 5.0.0.0

    Am I using the wrong variable type? I want the,
    Code:
    If updatedversion > currentversion Then
                MsgBox("New Update Avalible!")
                System.Diagnostics.Process.Start("https://www.UpdateSite.com")
            Else
                MsgBox("No Updates Avalible")
            End If
    To compare the whole number not just the first 3 characters....


    Thnx

  2. #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
    Hmmm.... or you can use Visual Studio's built in check for update feature.

    Just a thought


     


     


     



    The Most complete application MPGH will ever offer - 68%




  3. #3
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Quote Originally Posted by NextGen1 View Post
    Hmmm.... or you can use Visual Studio's built in check for update feature.

    Just a thought
    LOL Nextgen
    @ snotpig Ugleh posted a TUT on how to use a text file to check for updates. Use the all powerful search tool

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

    NextGen1 (03-13-2010)

  5. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Agreed, Search, Didn't I add it in the tuts?

    In either case, Everyone here by now knows how I am about cleanliness in code , Visual Studio will generate the code on build and publish, all you have to do is follow the steps.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  6. #5
    Bluthera's Avatar
    Join Date
    Dec 2009
    Gender
    female
    Location
    Shibuya, Tokyo
    Posts
    2,375
    Reputation
    13
    Thanks
    373
    My Mood
    Tired
    lolz....

    I have no idea, but myserver.com? It's .org

    yea, i probably spouted some stupid words there.
    [IMG]https://i564.photobucke*****m/albums/ss89/JRendell21/Graphics/Flow-Signature.jpg[/IMG]

  7. #6
    snotpig's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Under ur bed.
    Posts
    95
    Reputation
    10
    Thanks
    28
    My Mood
    Bored
    Quote Originally Posted by Bluthera View Post
    lolz....

    I have no idea, but myserver.com? It's .org

    yea, i probably spouted some stupid words there.
    Lol, I made that up because i didnt want to show my username on this other site...

    Its strange even though people looked at this thread the never answered my question. Maybe if i just said it instead of giving examples.

    What type should I use if i want to see if 1.2.3.4 is > 1.2.4.3?

  8. #7
    Bluthera's Avatar
    Join Date
    Dec 2009
    Gender
    female
    Location
    Shibuya, Tokyo
    Posts
    2,375
    Reputation
    13
    Thanks
    373
    My Mood
    Tired
    Quote Originally Posted by snotpig View Post
    Its strange even though people looked at this thread the never answered my question. Maybe if i just said it instead of giving examples.
    you should follow their advice and use the feature
    [IMG]https://i564.photobucke*****m/albums/ss89/JRendell21/Graphics/Flow-Signature.jpg[/IMG]

  9. #8
    snotpig's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Under ur bed.
    Posts
    95
    Reputation
    10
    Thanks
    28
    My Mood
    Bored
    Quote Originally Posted by Bluthera View Post
    you should follow their advice and use the feature
    I will, but what if I want to see if one number is bigger than the other. COMPLETLY unrelated to version checking...

    PS. I've never see/used the built in updater before, where/how do i use it? Im using VB 2008 Express.

Similar Threads

  1. Auto-Updating Addresses
    By OneWhoSighs in forum Game Hacking Tutorials
    Replies: 4
    Last Post: 04-29-2013, 06:10 AM
  2. [Help Request] Help to update
    By miladkingpro in forum Combat Arms Help
    Replies: 2
    Last Post: 07-11-2011, 03:12 AM
  3. [Help Request] Minecraft Auto-Updater unable to open
    By kenl12 in forum Minecraft Help
    Replies: 4
    Last Post: 07-04-2011, 05:15 PM
  4. [Help] With auto-updater
    By Jason in forum Visual Basic Programming
    Replies: 8
    Last Post: 05-10-2010, 12:15 PM
  5. [Please Help] Auto-Updating
    By twistedswift in forum Hack Requests
    Replies: 0
    Last Post: 08-01-2008, 10:59 AM