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. Auto Update for my application

Auto Update for my application

Scheduled Pinned Locked Moved C#
csharpannouncementquestion
4 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.
  • N Offline
    N Offline
    NetRocker
    wrote on last edited by
    #1

    Hi, I have written a software (a windows application) in C#.NET that is used by many clients of our company. Now my supervisor wants me to implement an auto update feature for the application. I think i am looking at a situation where my application needs to call a webservice to know if a newer version exists and if it does, it needs to download and execute the new version. Am I thinking in the right direction? If yes, can anyone provide me with what i need to do exactly? Any ideas will be highly appreciated.:) Thanks, Sandeep.

    J X 2 Replies Last reply
    0
    • N NetRocker

      Hi, I have written a software (a windows application) in C#.NET that is used by many clients of our company. Now my supervisor wants me to implement an auto update feature for the application. I think i am looking at a situation where my application needs to call a webservice to know if a newer version exists and if it does, it needs to download and execute the new version. Am I thinking in the right direction? If yes, can anyone provide me with what i need to do exactly? Any ideas will be highly appreciated.:) Thanks, Sandeep.

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      Where does the first link lead you?[^]

      1 Reply Last reply
      0
      • N NetRocker

        Hi, I have written a software (a windows application) in C#.NET that is used by many clients of our company. Now my supervisor wants me to implement an auto update feature for the application. I think i am looking at a situation where my application needs to call a webservice to know if a newer version exists and if it does, it needs to download and execute the new version. Am I thinking in the right direction? If yes, can anyone provide me with what i need to do exactly? Any ideas will be highly appreciated.:) Thanks, Sandeep.

        X Offline
        X Offline
        Xodiak
        wrote on last edited by
        #3

        i had to do something similar at my company...small company here's what i did. we have a networked server that everyone inhouse can access. the version number is located in the assembly of the app and i compare that to a data file located on the server (you can use streamreader to do that, or if you have a database back end that you can have the version information located inside of some table that you can query off of). you will need to make a deployment application (plenty of literature out there on that).

        here's what i did:

        -create deployment app (one of the projects that you can put in your solution) and compile: (.msi file is created)
        -put msi file in shared server directory and resolve the directory path to some web address
        -when the person logs into the app (im assuming through some login screen), a query is run to check the assembly version of the one on their computer as opposed to the most updated version
        -if they require an update, this is what you do:
        -implement the System.Net.WebClient class and download the msi off the server via the web address
        -use the DownloadFile method of the webclient class
        -save to a local directory (c:\temp perhaps...or somethign along those lines)
        -execute the msi process using: System.Diagnostics.Process.Start("c:\TEMP\yourapp.msi")
        -and then close your application: this.close() or something along those lines
        -the installation should run as normal and then the user can start up the application again
        -obvioulsy the version will be correct and this process wont happen again.
        -read up on deployment applications, im sure you can do something manual like copy each executable manually over the web, but the msi makes it much easier...creats short cuts and everything.
        only bad thing is that you're going to have to manually install the first version of this on each person's computer
        best of luck

        N 1 Reply Last reply
        0
        • X Xodiak

          i had to do something similar at my company...small company here's what i did. we have a networked server that everyone inhouse can access. the version number is located in the assembly of the app and i compare that to a data file located on the server (you can use streamreader to do that, or if you have a database back end that you can have the version information located inside of some table that you can query off of). you will need to make a deployment application (plenty of literature out there on that).

          here's what i did:

          -create deployment app (one of the projects that you can put in your solution) and compile: (.msi file is created)
          -put msi file in shared server directory and resolve the directory path to some web address
          -when the person logs into the app (im assuming through some login screen), a query is run to check the assembly version of the one on their computer as opposed to the most updated version
          -if they require an update, this is what you do:
          -implement the System.Net.WebClient class and download the msi off the server via the web address
          -use the DownloadFile method of the webclient class
          -save to a local directory (c:\temp perhaps...or somethign along those lines)
          -execute the msi process using: System.Diagnostics.Process.Start("c:\TEMP\yourapp.msi")
          -and then close your application: this.close() or something along those lines
          -the installation should run as normal and then the user can start up the application again
          -obvioulsy the version will be correct and this process wont happen again.
          -read up on deployment applications, im sure you can do something manual like copy each executable manually over the web, but the msi makes it much easier...creats short cuts and everything.
          only bad thing is that you're going to have to manually install the first version of this on each person's computer
          best of luck

          N Offline
          N Offline
          NetRocker
          wrote on last edited by
          #4

          Thank you very much for the tip. I was wondering how i could download files from a web address and you just solved my problem. Cheers!

          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