I would like to include a software update in my application that would check a shared location or an URL such as a shared URL from Google Drive that would replace the old .exe and config files. If a new update is available, then the user should get a notification etc.. Could someone guide me on how I can achieve this or if this is feasible?
Asked
Active
Viewed 706 times
-2
-
https://autoupdaterdotnet.codeplex.com/ – Morten Frederiksen Apr 29 '15 at 17:01
-
http://netsparkle.codeplex.com/ – Morten Frederiksen Apr 29 '15 at 17:03
-
@MortenFrederiksen wasn't it easier to write that as an answer? – csharpwinphonexaml Apr 29 '15 at 17:03
-
@RickS, I did google but I didnt get the answers i needed. There were different topics but none came close to what was provided by Morten. I am new to this field and I am sorry if my post made you feel that I didn't try before asking :) – svb Apr 29 '15 at 17:20
1 Answers
3
It is perfectly feasible.
There is one solution called ClickOnce which can check the updates at every launch.
The other way is to have another program which will be your updater since Windows won't allow you to overwrite an opened file (the main program can update the updater)
However, i would recommend dropbox's public folder to host your files, it has several advantages over Gdrive IMHO (direct download link (GDrive sharing link redirects to a download page, GDrive host URL does not report the downloaded file size))
EDIT : To use ClickOnce with Dropbox's public folder follow the steps :
(i'll assume you have the dropbox sync client installed)
1. (not mandatory if you plan to host only one project) create a subfolder in your dropbox public folder :)
2. Open your project's properties go in the "Properties tab"
3. The first box is where you will publish your application (select the folder created in 1)
4. The second box is where the installer/updater will fetch the files, this one is a little trickier.
4.1. Create a file in the folder created in 1
4.2. Wait for it to be synchronised... Right-click on it, then click on "Copy public link"
4.3. Paste the link in the second box (back in VS)
4.4. Remove the file name from the path you just pasted
5. Click on the "Updates" button then tick the checkbox "THe application must check for updates" then choose if you want the updates to be downloaded before or after the application launch.
And that's it for the basic configuration.
There's other possibilities but it's not the subject here :)

Irwene
- 2,807
- 23
- 48
-
thank you that was really helpful. I will give this a shot along with what others have just posted. If you have a sample code for Click Once using a dropbox URL, would you mind sharing? – svb Apr 29 '15 at 17:11
-
That's the catch :) ClickOnece does not need one line of code :) Go into your project's properties, check the publish tab..... That's ClickOnce configuration. – Irwene Apr 29 '15 at 17:11
-
in essence i would need something like autoupdaterdot net as the click once configuration won't allow it to be done because the app would be open. Does that mean I'd have to include something like a .bat file and call it once the download is complete? – svb Apr 29 '15 at 17:23
-
@svb ClickOnce uses an application reference to launch the application, it's the .NET Framework who will check the updates and prompt the user to update the software. In the case of an update, the upate will be downloaded then the application will be launched automagically :) – Irwene Apr 29 '15 at 17:28
-