I think that you can code it yourself. like in the code below :
For your Form
use the code below :
Imports System.Net
Public Class frmMain
Private WithEvents WebC As New WebClient
Private updatefilename As String
Private WithEvents updateTimer As New Timer With {.Enabled = True, .Interval = 300000} '300000 is 5 min
Private Sub frmMain_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
CheckUpdatePHP() ' you can use the php method or the normal method
End Sub
Private Sub CheckUpdatePHP() Handles updateTimer.Tick
Dim ServerVer As String = WebC.DownloadString("http://yourdomainname.com/update.php?get=ver")
If Not Application.ProductVersion.Equals(ServerVer) Then
Dim updateURL As String = WebC.DownloadString("http://yourdomainname.com/update.php?get=url")
updatefilename = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".exe"
WebC.DownloadFileAsync(New Uri(updateURL), updatefilename)
End If
End Sub
Private Sub CheckUpdate() 'Handles updateTimer.Tick
Dim ServerInfo As String = WebC.DownloadString("http://yourdomainname.com/version.txt")
Dim Infos As String() = ServerInfo.Split("%split%")
If Not Application.ProductVersion.Equals(Infos(0)) Then
Dim updateURL As String = WebC.DownloadString(Infos(1))
updatefilename = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".exe"
WebC.DownloadFileAsync(New Uri(updateURL), updatefilename)
End If
End Sub
Private Sub WebC_DownloadFileCompleted(sender As Object, e As System.ComponentModel.AsyncCompletedEventArgs) Handles WebC.DownloadFileCompleted
Dim pinfo As New ProcessStartInfo(updatefilename)
pinfo.WindowStyle = ProcessWindowStyle.Hidden
pinfo.CreateNoWindow = True
Process.Start(pinfo)
End
End Sub
End Class
The version.txt
should look like this :
1.0.0.0%split%http://yourdomainname.com/update.exe
the upload.php
if you will use the php method, should use this code :
<?php
if(isset($_GET['get'])){
$get = $_GET['get'];
$txt = file_GET_contents("version.txt");
$info = explode("%split%",$txt);
if($get = 'ver'){
echo $info[0];
}elseif($get = 'url'){
echo $info[1];
}
}
?>
If you will be using the PHP method
you should propably delete it from your Form code, also for the normal method you can upload the version.txt
file and update.exe
to your dropbox account and use them.
Feel free to ask.