Results 1 to 2 of 2

Thread: Creating a self-updater

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    Creating a self-updater

    Hello,

    I have created a application that I have installed on the user computer. However, I want the application to be self-updating. But I am not sure if this would really update the application.

    The application will download all the files from the web server, and replace the files in the directory where the program as been installed to. The user will restart the application.

    I am just want to be sure, because I can't replace the installed files with the updated ones. As the application will be running. So really the application cannot delete/replace itself.

    So, I was thinking that I could download into another directory, if the program is installed in this directory 'program files/application/1.0.0' then I could download the files to 'program files/application/1.0.1'.

    However, when the program restarts, how can it know that it has to execute from the 1.0.1 directory?

    I can't use clickonce or the updater block for this.

    Many thanks for any advice,
    steve

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Creating a self-updater

    You need to create a 2nd updater program which will download and replace the main application. So when the main application checks for update and if it finds one, it'll launch the updater and close itself. The updater does the download, replaces the files and then re-opens the main application before exit.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

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