Results 1 to 12 of 12

Thread: How To Update/Patch Your VB Programs?

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    6

    Exclamation How To Update/Patch Your VB Programs?

    Hi there um...I've made a simple program that consists of a combobox and a button i think. It's suppose to link to DVDs thats downloaded in the file...but i can't join the dvd and the file on one package...

    i wonder if i can patch the dvd and some changes to the program?

    EG: The Program is as simple as that, but i want to add new features to the .EXE file.

    Please Reply ASAP!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: How To Update/Patch Your VB Programs?

    A program cannot patch itself so you have two choices:

    1. Use ClickOnce deployment, which involves creating an installer using the Publish feature of VS. The most important feature of ClickOnce is automatica updating.

    2. Create a second application yourself that can check for updates, download them if they are available and replace the original app.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    6

    Re: How To Update/Patch Your VB Programs?

    1. I'm using Actual installer to make the installer and publish them.
    does that mean i have to change softwares?

    2. i don't know how to create tht kind of program.

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

    Re: How To Update/Patch Your VB Programs?

    Its quite simple - just create a separate EXE that does the following:

    1. Makes sure your main application is not still open.
    2. [Optional] Rename/move the main application EXE to something/somewhere else as a backup.
    3. Downloads the latest version of your program from a website to the same location that your main app EXE was stored in.

    Job done. If you dont know how to do any of those individual things then do a bit of research (ie search google and these forums) and if you get stuck then post on here
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: How To Update/Patch Your VB Programs?

    Not to discourage you but it might be easier at this stage to simply build a new installer and let users download and install it themselves. You can configure a VS Setup project such that new versions will automatically uninstall old versions first. It means a bit of manual intervention but not much. Creating an automatic update is far from impossible but it's far from trivial too.

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

    Re: How To Update/Patch Your VB Programs?

    Why is it far from trivial? I thought it was really straight forward, you could even just do something like this in your updater EXE:
    vb Code:
    1. Dim OnlineLocation As String = My.Application.CommandLineArgs(0)
    2. Dim LocalLocation As String = My.Application.CommandLineArgs(1)
    3.  
    4. My.Computer.Network.DownloadFile(OnlineLocation, LocalLocation)
    5.  
    6. MessageBox.Show("Update Complete")
    Then in your main application you just call that updater EXE and pass it the online file location and the path to the main application itself as command line arguments, then it closes itself and the user clicks Update in the updater EXE to kick off that code shown above. Obviously you need a bit of error handling and validation in there but that is the basics of it, why does it need to be any more complicated than that for a very basic application?
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  7. #7

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    6

    Re: How To Update/Patch Your VB Programs?

    ok but i got a couple problems too.

    my program needs the required file on C:\DVDManager.
    in that file i need the DVDs and in which case the dvd is 1GB+ some are 1GB- but if i place the program which the dvds an error message will say

    ERROR! The File Is To Big For The .CAB! The .CAB Can Only Support Maximum 2GB.
    if i put all the dvds together it wont work. i also don't have the time to upload them on the internet although i got a EXE that is ordered to download files to a specific folder. i've tried megaupload but it did not work...

    Besides if i use a FTP Server i can't keep it up 24/7...and there's a possibility that my EXE file can't download from an FTP server.

    any sugestions?

  8. #8

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    6

    Re: How To Update/Patch Your VB Programs?

    Quote Originally Posted by chris128 View Post
    Why is it far from trivial? I thought it was really straight forward, you could even just do something like this in your updater EXE:
    vb Code:
    1. Dim OnlineLocation As String = My.Application.CommandLineArgs(0)
    2. Dim LocalLocation As String = My.Application.CommandLineArgs(1)
    3.  
    4. My.Computer.Network.DownloadFile(OnlineLocation, LocalLocation)
    5.  
    6. MessageBox.Show("Update Complete")
    Then in your main application you just call that updater EXE and pass it the online file location and the path to the main application itself as command line arguments, then it closes itself and the user clicks Update in the updater EXE to kick off that code shown above. Obviously you need a bit of error handling and validation in there but that is the basics of it, why does it need to be any more complicated than that for a very basic application?
    Huh? in Plain English Please...

    I'm only 13 :S

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: How To Update/Patch Your VB Programs?

    Quote Originally Posted by chris128 View Post
    Why is it far from trivial?
    How are you going to check whether the version on the server is newer than the version on the client? How are you going to handle downloading multiple files, e.g. EXE, config, and DLLs? How are you going to handle losing an internet connection part-way through a download? As is almost always the case, there are more details to consider than it may appear on the surface.

  10. #10
    Stack Overflow mod​erator
    Join Date
    May 2008
    Location
    British Columbia, Canada
    Posts
    2,824

    Re: How To Update/Patch Your VB Programs?

    Quote Originally Posted by jetstream998 View Post
    ok but i got a couple problems too.

    my program needs the required file on C:\DVDManager.
    in that file i need the DVDs and in which case the dvd is 1GB+ some are 1GB- but if i place the program which the dvds an error message will say



    if i put all the dvds together it wont work. i also don't have the time to upload them on the internet although i got a EXE that is ordered to download files to a specific folder. i've tried megaupload but it did not work...

    Besides if i use a FTP Server i can't keep it up 24/7...and there's a possibility that my EXE file can't download from an FTP server.

    any sugestions?
    I don't really understand this. But here's something you can do:
    1. Create a free account at http://www.bravenet.com/ .
    2. Upload the file to a newly created bravenet site (you could make myprogramupdates.bravehost.com or something.)
    3. Use this code in a seperate installer program.
    vb.net Code:
    1. Dim wc As New Net.WebClient()
    2. wc.DownloadFile("http://www.myprogramupdates.bravehost.com/my_program.exe","/temp_upd_file.tmp")
    3. IO.File.Copy("/temp_upd_file.tmp","c:/Program Files/My Program/my_program.exe")

    You were saying something about the file being 2GB or something, but I'm not sure what you mean by that, Microsoft doesn't even make 2GB programs as far as I know of and you say you're 13. So I'm just assuming that the file is not that big. If it is 2GB like you say... why exactly is it that big?

  11. #11

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    6

    Re: How To Update/Patch Your VB Programs?

    Quote Originally Posted by minitech View Post
    I don't really understand this. But here's something you can do:
    1. Create a free account at http://www.bravenet.com/ .
    2. Upload the file to a newly created bravenet site (you could make myprogramupdates.bravehost.com or something.)
    3. Use this code in a seperate installer program.
    vb.net Code:
    1. Dim wc As New Net.WebClient()
    2. wc.DownloadFile("http://www.myprogramupdates.bravehost.com/my_program.exe","/temp_upd_file.tmp")
    3. IO.File.Copy("/temp_upd_file.tmp","c:/Program Files/My Program/my_program.exe")

    You were saying something about the file being 2GB or something, but I'm not sure what you mean by that, Microsoft doesn't even make 2GB programs as far as I know of and you say you're 13. So I'm just assuming that the file is not that big. If it is 2GB like you say... why exactly is it that big?
    ok my program manages DVDs, the DVDs are like 1GB and above or at least 700MB...Actual Installer Cannot Pack More Than 2GB...

  12. #12

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    6

    Re: How To Update/Patch Your VB Programs?

    I have this Dowloader that i made in Visual Studio 2010

    Download :
    http://www.mediafire.com/download.php?wrvmmmmt1lw

    anything i can do with it?

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