473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

webupdate

Hi

I have an existing app, and I would like to incorporate a web update facility,
At first I would only give a message, but at second stage I would like to update
the .exe itself with the update.

Now what I have to do is go online and check for an updated version of the .exe
in some way, maybe the version number (my idea..) ??
I definitely could use some help with the socket classes.

If there is a better way then my 'version number'-idea, please enlighten me :)
I already considered uploading a small file containing the version number, but I
would like to look for an alternative without extra files.

The 2nd thing was updating the running .exe

I hope someone could help me with these 2 things :)
Nov 20 '05 #1
8 931
I solved the problem by using a helper app.

when my program ends it fires off the helper app. The helper app
connects to the network and just checks the file modification time of
the exe on the network drive. It then compares the modification time of
the local .exe to the remote .exe. If the remote .exe is newer then my
helper app copies it locally. I don't need to worry about it updating a
running exe because the update only looks for an update when the main
program is closing down. I have a function to stop the main program if
it is running though in my helper app.

HamuNaptra wrote:
Hi

I have an existing app, and I would like to incorporate a web update facility,
At first I would only give a message, but at second stage I would like to update
the .exe itself with the update.

Now what I have to do is go online and check for an updated version of the .exe
in some way, maybe the version number (my idea..) ??
I definitely could use some help with the socket classes.

If there is a better way then my 'version number'-idea, please enlighten me :)
I already considered uploading a small file containing the version number, but I
would like to look for an alternative without extra files.

The 2nd thing was updating the running .exe

I hope someone could help me with these 2 things :)


Nov 20 '05 #2
You should make some file verification stuff too... like
checking the md5 sum or something before installing the
updated exe... looks nice and makes sure there is no
errors...

-----Original Message-----
I solved the problem by using a helper app.

when my program ends it fires off the helper app. The helper appconnects to the network and just checks the file modification time ofthe exe on the network drive. It then compares the modification time ofthe local .exe to the remote .exe. If the remote .exe is newer then myhelper app copies it locally. I don't need to worry about it updating arunning exe because the update only looks for an update when the mainprogram is closing down. I have a function to stop the main program ifit is running though in my helper app.

HamuNaptra wrote:
Hi

I have an existing app, and I would like to incorporate a web update facility, At first I would only give a message, but at second stage I would like to update the .exe itself with the update.

Now what I have to do is go online and check for an updated version of the .exe in some way, maybe the version number (my idea..) ??
I definitely could use some help with the socket classes.
If there is a better way then my 'version number'- idea, please enlighten me :) I already considered uploading a small file containing the version number, but I would like to look for an alternative without extra files.
The 2nd thing was updating the running .exe

I hope someone could help me with these 2 things :)


.

Nov 20 '05 #3
when my program ends it fires off the helper app. The helper app
connects to the network and just checks the file modification time of
the exe on the network drive. It then compares the modification time of
the local .exe to the remote .exe.


But in this way you're not sure if you have an updated .exe, it mat be the old
one, but just with a different date then.
Now it's nice of you to say your're working with a 2nd app but that doesn't
solve my problem :) I just need some help using the tcpclient classes, msdn and
google couldn't give me a straight forward example

Nov 20 '05 #4

<an*******@discussions.microsoft.com> schreef in bericht
news:01****************************@phx.gbl...
You should make some file verification stuff too... like
checking the md5 sum or something before installing the
updated exe... looks nice and makes sure there is no
errors...


But then everytime you want to check for an update, you need to download the
file and calculate the checksum.
I'm looking for a way to check it online, without downloading, e.g. maybe I
could check the version number online??
Nov 20 '05 #5
* "HamuNaptra" <ha********@pandora.be.NOSPAM> scripsit:
I have an existing app, and I would like to incorporate a web update facility,
At first I would only give a message, but at second stage I would like to update
the .exe itself with the update.


Why not use that?

<http://windowsforms.net/articles/appupdater.aspx>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #6
In what way am I not sure if I have an updated exe? I don't understand
your point. I create a new exe and put it out on the network where my
updater program looks and the updater will see the new file. If I have
not put a new file out for update then there is no way the modification
date of the current exe is going to change? I don't understand your
confusion when you say "But in this way you're not sure if you have an
updated .exe, it mat be the old one, but just with a different date
then." Again the only way there will be a different date on the exe in
the update directory is if _I_ put a new out there. Files just don't go
and change modification dates by themselves.

HamuNaptra wrote:
when my program ends it fires off the helper app. The helper app
connects to the network and just checks the file modification time of
the exe on the network drive. It then compares the modification time of
the local .exe to the remote .exe.

But in this way you're not sure if you have an updated .exe, it mat be the old
one, but just with a different date then.
Now it's nice of you to say your're working with a 2nd app but that doesn't
solve my problem :) I just need some help using the tcpclient classes, msdn and
google couldn't give me a straight forward example


Nov 20 '05 #7
> Files just don't go
and change modification dates by themselves.


no, but you or someone else could :)
Nov 20 '05 #8
Why not use that?

<http://windowsforms.net/articles/appupdater.aspx>


really, really nice. But I think its a bit too big :)
My app consist of just 1 .exe with no install software, so I really can't use
different directories for different versions, if I allow the user to place my
app where he wants on his hard drive. If I had a bigger project with an
install-file I would really use this. tnx for the link.
Nov 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.