Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[TUT][.Net]Very Easy Update System for all your application[Src] + Info about XML[TUT

In this Tutorial I will show you how to update your applications using a xml file.

Using this system you will be able to update all your applications using a single xml file.

This method can be used both in C# & Vb.net.

I will be using VB.net.

Let's Start:-

1. First we need to create a xml File.

It can be created in any text editor(such as notepad).
Sample file is as below:-

Code
<?xml version="1.0" encoding="utf-8" ?>
<root>
<apps>
<Appname>First Application</Appname>
<ver>1.0.0.1</ver>
<dlUrl>http://www.xyz.com/update.exe</dlUrl>
</apps>
<apps>
<Appname>Second Application</Appname>
<ver>2.0.5.86</ver>
<dlUrl>http://www.xyz.com/application2/update.rar</dlurl>
</apps>
</root>

:- Things you should know :-
1. The first line tells that the file is xml file and it's version and encoding and there are lot more things that you can put but its basic.
2. "<root> " & "<app>" are called nodes. It is compulsory to have atleast 1 node that is root(can be named differently), also there cannot be more then 1 root node so it is kind of necessery to create another node.
3. <root>&</root> are called tags. Every element has a starting tag(e.g. <root>) and a closing tag(e.g </root>)
4. Xml doesn't need any other kind of software to make or read or to play with.
5. Xml tags are case sensitive i.e. 'root' is not equal to 'Root' and 'dlUrl' is not equal to 'dlurl'.

:-About the File Above:-
1. We have created an app node. Under app node we have three item:- Appname, ver and dlUrl.
2. Our update system will read info from this items and check whether to update or not.
3. You can increase the no. of app nodes as you wish just remember to close the tags properly.(you must have an <app> & </app> for every application. You can name it anything but then you will have to change the code in the .net application also. So keep it simple for now.)
4. We are going to supply information about our application in the following way. Appname will contain the name of application, ver will contain the current ver available , and dlUrl will store the address of the update file.

Too much of XML stuff now lets move to Vb.net code:-

Code is really simple you can put it under the button_click event handler or make it a function.

I have put it under the click event handler.

[IMG]http://girlzlist.0fees.net/dm-10128729860215.png[/IMG]

[IMG]http://girlzlist.0fees.net/dm-712872986021.png[/IMG]

After this if your application has a newer version then it will ask the user to click the update button to download the file.
The link to the updated file will be stored in dlUrl variable.

I am not providing the code for that as it is very easy to do.
(Reason for posting images to make VB.noobs to learn how to write their own Programs.)

But still If you don't want to learn be my Guest and download the Sample project.(Read the Read Me!!.txt File for info)

At last a tutotrial that I think will be appriciated by HF!!

Thanks !!

Download:- http://www.filesonic.com/file/25491213/S...pdater.rar

PS:- Sorry for the bad formatting. Also if you have any queries post it here. Please try to keep the thread alive!!
Not even a single reply?

I am disappointed!!

this is so not cool!!

atleast say that you didn't like it!!
i think this is very great actually. Great explanations to go with it as well
Dude, its a great tuorial. Thank you very much. This will help a lot of people. Enjoy the +rep.
Aint this been released before mate?
(Oct 23, 2010 08:56 AM)Zer[o] Wrote:  i think this is very great actually. Great explanations to go with it as well

Thanks Guyz!!

I will do another tutorial using xml in vb!!


(Oct 23, 2010 09:06 AM)Asus Wrote:  Aint this been released before mate?

really??

Can you post a link!!
XML really isn't needed for updating, but nice contribution.
nice tut, never seen a update system with xml
(Oct 30, 2010 11:07 PM)xSilent Wrote:  XML really isn't needed for updating, but nice contribution.

Actually you are right. Xml s really not needed. I was working on a rss reader and thought i could use xml else where.(even in a rat/ I can control my rat using twitter, And i am serious).

So i thought of making a update system. I saw how people used text files to update their program.

Advantages of my system:-

1. One file to all your applications.
2. You will learn about xml.
3. There is a way you can control your rats using xml. Without getting caught.

Think ...

i willl be releasing some more tuts soon.

But the response here is not so good ... i mean on other forums it is slightly better!!

Whoa I typed that much.lol
any body found it useful??

did somebody even tried this?
I tried it. its something differnt n I like it.
Verry Nice Tutorial grate help thanks. mate :D
(Aug 1, 2011 09:35 AM)lwelch45 Wrote:  I tried it. its something differnt n I like it.

Good to know someone tried it?

(Aug 1, 2011 10:13 AM)mc_mark Wrote:  Verry Nice Tutorial grate help thanks. mate :D

You are welcome. Will post new tuts if I find gud response.



Tell me some other ways of using xml

i will write a tut
Downlaod link and Images broken :-(
(Oct 17, 2011 05:02 AM)Deadhy Wrote:  Downlaod link and Images broken :-(

I can't see them either :/ but by the sounds of it, it looks good.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by neon_lightApr 17, 2021 08:59 AM 16 1,027 Apr 17, 2021 08:59 AM
Last Post: Stanley
[Java] by TennoFeb 3, 2019 04:49 AM 4 307 Feb 3, 2019 04:49 AM
Last Post: Tenno
[.NET] by Shadow ReignJul 18, 2018 04:14 AM 3 132 Jul 18, 2018 04:14 AM
Last Post: sh@rp