1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
FileVersionInfo fvs = null, fvl = null;
fvl = FileVersionInfo.GetVersionInfo("http://www.monsite.com/programme/Wolfy.exe");
fvs = FileVersionInfo.GetVersionInfo(Application.StartupPath + @"\Wolfy.exe");
if (fvs.FileVersion != fvl.FileVersion)
{
MessageBox.Show("Nouvelle version disponible");
// On télécharge la nouvelle version de notre dll
//WebClient wc = new WebClient();
//wc.DownloadFile("http://www.monsite.com/programme/Wolfy.exe", "system\\Appli.dll");
//wc.Dispose();
}else{
MessageBox.Show("Aucune mise a jour disponible");
// La dll n'est pas présente localement (il s'agit probablement du premier lancement de l'application)
// On télécharge la dll
//WebClient wc = new WebClient();
//wc.DownloadFile("http://www.monsite.com/programme/Wolfy.exe", "system\\Appli.dll");
//wc.Dispose();
} |
Partager