Post: [C#] [Source] Update Checker
11-16-2014, 02:09 PM #1
(adsbygoogle = window.adsbygoogle || []).push({});
Hey Guy's I wold like to show you my Update Checker iv'e made.
It's very simple to use, you only need a FTP File Server and Hands.

You can copy and paste my Pastebin.

You must login or register to view this content.

Source :

You must login or register to view this content.

You must login or register to view this content.

Place the XML File here in the root of your Server :

You must login or register to view this content.


Create the XML File with MS WebMatrix, this is the easiest way.


<?xml version="1.0" encoding="utf-8" ?>
<xxx>
<version>1.0.0</version>
<url>https://www.envmrx.zz.vc</url>
</xxx>



Save this as update.xml and upload this on your server.
If you uploaded this file then you have a link like this :

[url]www.envmrx.zz.vc/update.xml[/url]

You can change the Version of your tool here :

You must login or register to view this content.

Right Click on the Namespace of the tool then Proberties and click on Assembly Information here you can change under Assembly Info. your Version.

If you have Questions inbox me.
Last edited by Clay Nation ; 11-16-2014 at 02:13 PM.
11-17-2014, 07:21 AM #2
Pichu
RIP PICHU.
Looks basic but useable. There are many other ways to implement, you also will want to check to make sure there is internet connection first, if the device is disabled; don't even bother with attempting to check. Checking the connection is simple, just do a quick google search on that part.

Also, for the dialog, make use of String.Format() helps keep the error look clean.

Might want to also ping the server before trying to run the code, if the ping fails, you can create an alert message to let the user or you know that there was an error connecting to the server.

If you just use a try/catch, multiple issues could go on.

So, recap:

Check Internet Connection - If Not Connected, Alert User "Not Connected to the Internet"
Check Server (Ping) - If no response, Alert User "Server May Be Offline, Please Check Again"
Check Version (If same or higher) - Your program is up to date
Check Version (If Version is lower) - There is an update available, would you like to download?

The download location can be held on the server as dlLink.txt

Just use WebRequest to read the info and handle the link you update then have the program download.

There are a lot of ways to update programs, my favorite is using Installshield. Have your application check for updates, if true download the new file in Installshield build into the temp location. Then initiate the install (Run the application). Simple as that.
11-18-2014, 10:57 PM #3
jagex
Gym leader
Nice job but I have a noob question. Isn't it better to use: using(reader.read())?
12-14-2014, 01:16 AM #4
Originally posted by jagex View Post
Nice job but I have a noob question. Isn't it better to use: using(reader.read())?


i dont know Happy i use this what you see and it works fine but you can test it Happy
12-14-2014, 05:55 AM #5
jagex
Gym leader
Originally posted by Clay
i dont know Happy i use this what you see and it works fine but you can test it Happy



anything that uses IDisposable/Resource, you should use using from what I read.

using(reader.read())
{
//code here
}

If you use that then you don't need to worry about disposing it with reader.dipose();
Last edited by jagex ; 12-14-2014 at 06:02 AM.
03-11-2015, 03:46 PM #6
XxBlud23xX
< ^ > < ^ >
Thanks Clay p, I'll give credit Smile
03-22-2015, 08:10 PM #7
joshk326
Little One
i have a red line under Console.WriteLine(ex.Message); and its just under "WriteLine" does anyone know what its for?

The following user thanked joshk326 for this useful post:

Passion
05-21-2015, 03:24 PM #8
looks nice I try it

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo