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