Link to home
Start Free TrialLog in
Avatar of JonnyB99
JonnyB99

asked on

Online Update

Hi, Is there i way that i can put something in my program to check and see if there is an update for a new version or something. Thanks
Avatar of mark2150
mark2150

Ummm, you trying to get update from LAN or web. Either way you'ld have to attempt to locate file and check date stamp.

Would be major PITA if every time you fired up program it attempted to dial out. Good way to PO users!

Put it under a menu selection, or track last time you checked in registry and check, say, monthly. Give operator a [Don't check automatically] button in the config. in case your web site ever goes down.

Yes, you can use the internet control to read a web page. If you put a distinctive marker on the page (like one of the App. properties) then your software can scan the page and look to see if the page references a newer version. If it finds it, it can D/L it and go. Problem is that you can't easily replace the .EXE file of a running program. You'ld have to hand off execution to *another* program, shut down primary program, allow alternate launch the install and then switch back.

Seems like a *LOT* of effort (and it is). Much easier to tell users to check your website for latest version and let them handle the messy details of installing.

Also, a *LOT* of users (myself included) don't like software changing things unless *I* tell it to. You bump into a user who as tweaked their system "just so" and then your install goes in and fiddles, well, lets just say you'ld better get asbestos phones for your help desk staff!

M

Avatar of JonnyB99

ASKER

Ok, Thanks anyway.
I have a solution.  I can email you the code if you wish.  Please email me at masseym@mrqcorp.com.

Basically, you have an online database that contain the information about the software that you want to support.  It has a name and the most recent version.  YOu then put in your program to check that database and see if the version is lower than the one in the database.  If it is, DL the newer version.
ASKER CERTIFIED SOLUTION
Avatar of waty
waty
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
waty,

how does that tell us if there is a new version?


In your setup application, you can execute a little app wich verify the version of the installed exe.
OK, but how does that check to see if it is the latest version?  What if I want to upgrade 2 months AFTER I install?  You need a little program that will check it against a database and then DL the new stuff if it is newer.
When you create an exe, you set the version, subversion.
Create another exe with the same version wich will only check the version of the installed exe.
So you have the actual version you want to install in the check exe.
I think you are missing the overall idea of the program.  he wants to have an ONLINE update.  If Version installed < current version, install from the internet.  If version installed >= current version, no update necessary.
To download a new version :
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

ShellExecute 0&, vbNullString, "http://www.geocities.com/ResearchTriangle/6311/preview50.zip", vbNullString, vbNullString, vbNormalFocus

I was having same problem.  What is does is that I put a .txt file on my ftp.  In .txt file I write the version no.,  in .exe file i define a variable versioninfo=1.0.  Whenever i create a new version i write next version no. and update it into text file.  so if my versioninfo <> .txt file's versioninfo means downloads are available. here is some sample code.
OnlineUpdateAvailable = False
   
Dim MyNewVer As String
    MyNewVer = ""
    b() = Inet1.OpenURL("http://myURL/ver.txt")
    For t = 0 To UBound(b)
        If b(t) <> 0 Then MyNewVer = MyNewVer + Chr(b(t))
    Next
    Inet1.Cancel
    If MyNewVer <> VerInfo Then OnlineUpdateAvailable = True