Results 1 to 2 of 2

Thread: Update Wizard

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    127

    Exclamation

    Does any one came a cross a nice UPDATE application. What I mean if to go to the server look at a version the make and update? If required..

    You seen I had this crazy ideia of having a piece of software then intead ol downloading the exe file again I only would download some txt files or something like that that would would be integarted with my software.

    Or does any one has any other ideias of how to update a piece of software???
    ASPWIZARD

    http://www.aspwizard.co.uk

  2. #2
    Lively Member PatOls's Avatar
    Join Date
    Oct 2000
    Posts
    99

    Arrow This code'll do the trick

    Is this what you're looking for? , this code checks for updates on a server and the either launch an update program or resumes the application

    Code:
    dim fs
    dim strNew, strOld, strUpd as string
    dim sVal
    
    strNew = "NewServerUpdate"
    strOld = "OldClientVersion
    
    set fs = CreateObject("Scripting.FileSystemObject")
    if fs.fileexists(strNew) then
    
    fs.GetFileVersion(strOld) 'The GetFileVersion could be used to compare the two, but I only use it to show the user which version he uses and the newest version
    
    strUpd = strComp (strOld, strNew) ' This is just a string-comparison which give you the value for update or not update
    
    select case strUpd
    case -1 or 1
    msgbox "UpdateExists" 'launch the update-program, which overwrites the old file with new file
    sVal = shell("UpdateProgram")
    case else
    msgbox "noupdate" 'resume the application
    end select
    
    else
    'resume the application
    end if
    The "Update" Application will just have to use the FS and overwrite the old-file (clientside) with the new update file from the server.

    msg me if you don't understand and I'll help you

    /Patrick






Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width