using System.Net;
using System.IO;
public readonly string Version = "1.0.0.0";
public string getVersion()
{
return Version;
}
public void Updater()
{
string URL = "https://yoursite.x10.mx/Updates/";//put the url of your site here
string appName = "FileName.Rar";//Name of your file on the site
string serverVersion;
string serverVersionName = "Version.txt";//Name Of The Version Text Document
WebRequest req = WebRequest.Create(URL + serverVersionName);
WebResponse res = req.GetResponse();
Stream str = res.GetResponseStream();
StreamReader tr = new StreamReader(str);
serverVersion = tr.ReadLine();
if (getVersion() != serverVersion)
{
WebClient client = new WebClient();
byte[] appdata = client.DownloadData(URL + appName);
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
using (FileStream fs = File.Create(saveFileDialog1.FileName))
{
fs.Write(appdata, 0, appdata.Length);
}
MessageBox.Show("You File Has Been Download To:\n" + saveFileDialog1.FileName + "\nDownload Complete!");//this comes up after you have downloaded the new update
}
}
else
{
MessageBox.Show("No Updates Are Currently Available.", "No Updates Found", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);//This message box pops up if you have no updates available
}
}
Updater();
If You Guys Still Need Any Help Just Ask!! Copyright © 2026, NextGenUpdate.
All Rights Reserved.