Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Creating a updater that will download and update installation files

Creating a updater that will download and update installation files

Scheduled Pinned Locked Moved C#
visual-studiosysadminquestionannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    steve_rm
    wrote on last edited by
    #1

    Hello, VS 2008 SP1 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,

    H G 2 Replies Last reply
    0
    • S steve_rm

      Hello, VS 2008 SP1 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,

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      The first thing to spring to mind is the terrible practice of downloading the new files to a temp folder, then creating a run once on startup shortcut to a small app that copies the new files over the old ones and if necessary deleting the temp folder. Then prompting the user to reboot and doing it for them if they say OK. But as I said it is a terrible practice, so I hope someone else has a better solution for you.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      1 Reply Last reply
      0
      • S steve_rm

        Hello, VS 2008 SP1 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,

        G Offline
        G Offline
        Giorgi Dalakishvili
        wrote on last edited by
        #3

        Here you are: .NET Client Applications: .NET Application Updater Component[^]

        Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups