|
-
Feb 10th, 2001, 09:47 PM
#1
Thread Starter
Lively Member
Ok, Here is what I am thinking. I have some ideas on how to do it. The thing is I am just interested in seeing someone elses implementation of it. So if anyone knows any articles on it or has done it and is willing to share some of your code, I would be eternally greatfull.
I have a small app that requires internet access to work. I only have one user but I update the app a lot right now. Since they are on the internet anyway and I have a website I could use. I would like the app to check something on my website to see if it is the most current version or if there is a newer one. If there is a newer one I want it to tell them and give them the option of automatically updating itself over the internet. I want it to download the file. Since they are on dial up, I would also like for it to be able to decompress the file/files from a cab/zip/rar or some other compressed format. I would then like for it to replace the files itself and restart itself.
TIA,
Richard
-
Feb 12th, 2001, 06:48 AM
#2
Addicted Member
I needed to do this for a program recently. I am using IP*Works component to do the Internet stuff so I cant tell you how to do it with winsock etc. Okay heres the basic idea:
Stick a text file on a ftp/web server that contains details about the latest version e.g. 1.0.1
Get your app to download this text file
Read the text file if it is different from your applications version (check using app.major etc) then the user does not have the latest version so download a new one. Call the downloaded app something different like update.exe
Run update.exe via shell command
Close current application
Update.exe deletes old version
Update.exe renames itself to original name
run renamed version
Close update.exe
When running new version check to see if update.exe exists and if so delete it.
Done - Phew!
When doing all this be sure to include doevents statement to allow the computer to catch up. You may not need to use compression utilities as the exe itself without dependancies is probably not that large.
Hope this helps
Alex
-
Feb 12th, 2001, 09:33 AM
#3
Thread Starter
Lively Member
Thanks, I have written my own little update program. It is really sweet. It does not only the exe but also dependancies so if a new version requires a new dll or a newer dll than the orig version it will download them as well. it downloads only the components needed in individual cab files and extracts them into an update directory. It has a process to handle in use files and works on NT and 9x (both of which have a different method for replacing in use files). I am hoping to get a reply from John or someone to see if I can post an article/demo of it.
-
Feb 13th, 2001, 07:28 PM
#4
Addicted Member
cool! How can you check which dlls etc that the user has installed?
Alex
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
|