-
Oct 17th, 2009, 05:55 AM
#1
Thread Starter
New Member
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!
-
Oct 17th, 2009, 09:08 AM
#2
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.
-
Oct 17th, 2009, 09:04 PM
#3
Thread Starter
New Member
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.
-
Oct 17th, 2009, 09:12 PM
#4
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
-
Oct 17th, 2009, 10:00 PM
#5
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.
-
Oct 17th, 2009, 10:16 PM
#6
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:
Dim OnlineLocation As String = My.Application.CommandLineArgs(0)
Dim LocalLocation As String = My.Application.CommandLineArgs(1)
My.Computer.Network.DownloadFile(OnlineLocation, LocalLocation)
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?
-
Oct 17th, 2009, 10:19 PM
#7
Thread Starter
New Member
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?
-
Oct 17th, 2009, 10:23 PM
#8
Thread Starter
New Member
Re: How To Update/Patch Your VB Programs?
Originally Posted by chris128
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:
Dim OnlineLocation As String = My.Application.CommandLineArgs(0)
Dim LocalLocation As String = My.Application.CommandLineArgs(1)
My.Computer.Network.DownloadFile(OnlineLocation, LocalLocation)
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
-
Oct 17th, 2009, 10:29 PM
#9
Re: How To Update/Patch Your VB Programs?
Originally Posted by chris128
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.
-
Oct 17th, 2009, 11:29 PM
#10
Re: How To Update/Patch Your VB Programs?
Originally Posted by jetstream998
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:
Dim wc As New Net.WebClient()
wc.DownloadFile("http://www.myprogramupdates.bravehost.com/my_program.exe","/temp_upd_file.tmp")
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?
-
Oct 18th, 2009, 04:53 AM
#11
Thread Starter
New Member
Re: How To Update/Patch Your VB Programs?
Originally Posted by minitech
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:
Dim wc As New Net.WebClient()
wc.DownloadFile("http://www.myprogramupdates.bravehost.com/my_program.exe","/temp_upd_file.tmp")
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...
-
Oct 18th, 2009, 04:58 AM
#12
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|