Results 1 to 10 of 10

Thread: [HELP] Automatic Update?

  1. #1

    Thread Starter
    Member
    Join Date
    May 2010
    Posts
    35

    Post [HELP] Automatic Update?

    Hey, im slightly new to VB, i was wondering how I make the program check a file for an update, i kknow there is an option in the app settings, but when I go on it it doesnt recognize .vb or .exe files to check from.

    If i uploaded updates to a server, how would It check that for updates? and what file type would i need to upload it as?

    Any help appreciated thanks

  2. #2
    Fanatic Member Satal Keto's Avatar
    Join Date
    Dec 2005
    Location
    Me.Location
    Posts
    518

    Re: [HELP] Automatic Update?

    Well as you mentioned there is some form of functionality that does this that is built into Visual Studio, although I'm not familiar with this.

    But one method that a previous employer did was create a directory on the website which had a text document called version.txt, which the program downloaded each time it was started and compared the version in the text file to the version of the program that was running. Then if the version of the program was less than the version in version.txt then it would download a file called update.exe in the same directory as the version.txt file.

    Obviously if you can get the built in functionality working then that would be better but that is just an alternative that you could use if you wanted.

    Satal

  3. #3

    Thread Starter
    Member
    Join Date
    May 2010
    Posts
    35

    Re: [HELP] Automatic Update?

    Thats a good idea mate, i'll figure out how to exactly do that, because as i said, im a bit of a newbie lol, cheers

  4. #4
    Fanatic Member Satal Keto's Avatar
    Join Date
    Dec 2005
    Location
    Me.Location
    Posts
    518

    Re: [HELP] Automatic Update?

    I just had a quick Google to see whether I could find an article on the subject of doing program updates and found the following article which appears to be a pretty good explanation of a system that appears to be similar to what I described above.
    http://www.dreamincode.net/forums/to...ates-from-web/

  5. #5

    Thread Starter
    Member
    Join Date
    May 2010
    Posts
    35

    Re: [HELP] Automatic Update?

    Wow thanks man, i'll try and do that once i get my server back lol, looks worth looking into though. Only thing is i have VB2010 Express, so i dunno if itle work, but i'll try :P

  6. #6
    Fanatic Member Satal Keto's Avatar
    Join Date
    Dec 2005
    Location
    Me.Location
    Posts
    518

    Re: [HELP] Automatic Update?

    I don't see any reason why it wouldn't work, although if it does then it might work by setting your project to use an earlier version of the .Net framework, but we'll cross that bridge if it comes to it

  7. #7

    Thread Starter
    Member
    Join Date
    May 2010
    Posts
    35

    Re: [HELP] Automatic Update?

    haha yeh, cheers for all your help

  8. #8
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: [HELP] Automatic Update?

    Quote Originally Posted by FunkyFreddo View Post
    Wow thanks man, i'll try and do that once i get my server back lol, looks worth looking into though. Only thing is i have VB2010 Express, so i dunno if itle work, but i'll try :P
    There's absolutely no reason why you wouldn't be able to just download and read a text file from a VB app written in the Express version of VB 2010. You can still do everything that you would be able to do in the full version of Visual Studio when it comes to code, its just features in the development environment that are better in the full versions.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  9. #9
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [HELP] Automatic Update?

    What we've been doing is to create a web service and the application consumes the service for its auto-updating purposes. The web service has a few methods:
    1. CheckForNewVersion(fileName, version) As Boolean: Takes a file name and its version as arguments and returns a boolean indicating whether there is a newer version or not on the server.
    2. DownloadFile(fileName) As Byte(): When called, it returns a byte array of the file being downloaded.

    So on the windows application, when it checks for updates, it will call the checkfornewversion on each file that may need updating. If there is an updated version, it then call the downloadfile to download that file and place it in a temp folder. The main application then launch an updatehelper application passing in the paths of the downloaded files then close itself. This updatehelper app will move those files to their locations overwriting the existing ones. When done, it relaunches the main app.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  10. #10

    Thread Starter
    Member
    Join Date
    May 2010
    Posts
    35

    Re: [HELP] Automatic Update?

    Ahh right, i think I get it now... I'll try and impliment it when i've finished V1 of my app ^_^ thanks for all ur help xD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width