VB.NET and FTP Auto Update

  • Thread starter Thread starter Dino M. Buljubasic
  • Start date Start date
D

Dino M. Buljubasic

I am building an applicatin that will be able to automatically update itself
from an FTP server.

I'd like to be able to determine which version of application is newer, the
one currently running or the one found on the FTP server (the .msi file).
My idea is to look at the FTP server for an .msi file and compare its date
with the date stamp of the application currently running and then download
the release only if it is newer then running application.

How can I get the information about currently running application such as
its file date stamp?

Any suggestions are welcome.

Regards,
 
File date stamp would be rather unreliable... get the version info...

plus, there a lot better ways to do live updaters than filestamps (plus
firewall problems..)
 
You can get the version from your Assembly in the System.Reflection
namespace with the

AssemblyInformationalVersionAttribute.InformationalVersion Property

Lot of information. can you have access to a sql server or text file to
compare latest versions of the file?

you can use a webclient to (I think) make connection to FTP. its just a
pain sometimes...

I hate FTP though.
 
Look up .NET Application Blocks on MSDN. You can download some code that
does this.

HTH.
 
Do you mean to have an additional text file stored on SQL Server ? Yes, I
could do that.
The file can contain info about the date, size, etc (probably version
number, too).

Tell me little bit more about that, please.

I am already connecting to an FTP server and downloading test file but would
like to be able to compare the version (or date) of my current application
with the version (or date) of the .msi file on the server.

Thank you, let me know if I am on the right track.

Regards,
 
Are you using an intranet or the internet to push the
updates? If the internet, you probably can't get there
without a web server. If you are using an intranet, you
can do it from a shared folder. Paul Kimmel has a new
book
http://www.amazon.com/exec/obidos/ASIN/0672324075/internco
m-20/002-4611773-6304806 that discusses this in depth...
I can send you some code to do it. Effectively you need
two assemblies, one that calls the second, and it looks
to somehwere 'else' to check if the somewhere 'else' on
is newer than the one it wants to use. I've done it on
the intranet at work, and on a scale of 1 to 10, it's
about a 4 the first time through, and much easier
afterward, setting the permissions is the main gotcha.

Let me know which scenario you are using and I can be of
more help.

Good Luck,

Bill

W.G. Ryan
(e-mail address removed)
www.knowdotnet.com
 
Why do you have to do it from an FTP server?

Dino M. Buljubasic said:
Unfortunatelly, all the samples provided there and online are refering to
AutoUpdate with an Web Server. That is not what I want. I want to do it
from an FTP server.
 
You'll probably have to use time/date stamps - despite it being a crude
solution. An FTP server really isn't ideal for this kind of thing - you can
do much more with a web server.
 
Hi CJ,

how do I get that info though?

When I type :

System.Reflection.AssemblyInformationalVersionAttribute. it does not show
InformationalVersion and does not let me show it let's say in a message box.

Thanks,
 
Hi Cor,

yes FileInfo works fine but the problem is that I am downloading the file
from FTP server. To download the file, I have to create another file on
local machine and FileInfo gets the info about that newly created file, not
the original info of the file from the server.
 
Pardon my french...

but who gave you these ****ed up specs?

If you even tell me its a security thing, so help me god....

1993 called. they want there protocol back...
 
I know, I know. The problem is I am in a new field here and there is no
time to change requirements. Saying that, I need solution to THIS
requirement although I would be way happier to use Web Server instead.

Any suggestions are welcome.

Regards,
 
Back
Top