SolvedUpdate Notification

Posts 1–10 of 10 · Page 1 of 1
Update Notification
hey guys
i'm just asking for an update notification Code??
What the hell?

Have you ever thought about doing whatever you want to be done, youself? Instead of leeching code?
Quote Originally Posted by 'Bruno View Post
What the hell?

Have you ever thought about doing whatever you want to be done, youself? Instead of leeching code?
isn't that forum to ask for help and learn?or am i wrong?

---------- Post added at 01:54 AM ---------- Previous post was at 01:52 AM ----------

Quote Originally Posted by Cryptonic View Post
Update notification..? You mean like a message box, or a Tray Icon Notification...?
have u seen Team Viewer ? when there is an update it appears a notification like msgbox and tells u thats there is a newer version and two buttons with"Download Now" and thats transfer u to the website to download the new version and the other is a "Download Later" button

---------- Post added at 01:55 AM ---------- Previous post was at 01:54 AM ----------

Quote Originally Posted by codyccps View Post
You need a server to host the updated file on. (IE - Website/*******/SQL etc..) Then just make a link to that, check it. If version.txt ( Uploaded ) does not equal current version, link to the file to download it, that simple.
the server can be hosted by 50*********
Quote Originally Posted by tetobolla View Post
isn't that forum to ask for help and learn?or am i wrong?
Yeah but that doesn't gives you the right to abuse the privilege of being stupid. You are just blindly asking for stuff without attempting to do it yourself and hell, you can't even explain what you want in a single post.
Update notification..? You mean like a message box, or a Tray Icon Notification...?
You need a server to host the updated file on. (IE - Website/*******/SQL etc..) Then just make a link to that, check it. If version.txt ( Uploaded ) does not equal current version, link to the file to download it, that simple.
Do what this person said,
http://www.mpgh.net/forum/33-visual-...ml#post6413844

Heres a simple way to use it
Code:
Dim currentVersion, updateVersion as string
Private Sub Updates()
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create _
                                                   ("") ' Url of the hosted .txt file
        Dim response As System.Net.HttpWebResponse = request.GetResponse
        Dim sr As System****.StreamReader = New System****.StreamReader(response.GetResponseStream())
        updateVersion = sr.ReadToEnd
        currentVersion = Application.ProductVersion
        sr.Close()
If Not currentVersion = updateVersion Then
' What you want to happen if there is an update
else
' What you want to happen if there isn't an update
End If
Quote Originally Posted by tetobolla View Post
hey guys
i'm just asking for an update notification Code??
Quote Originally Posted by DawgiiStylz View Post
Do what this person said,
http://www.mpgh.net/forum/33-visual-...ml#post6413844

Heres a simple way to use it
Code:
Dim currentVersion, updateVersion as string
Private Sub Updates()
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create _
                                                   ("") ' Url of the hosted .txt file
        Dim response As System.Net.HttpWebResponse = request.GetResponse
        Dim sr As System****.StreamReader = New System****.StreamReader(response.GetResponseStream())
        updateVersion = sr.ReadToEnd
        currentVersion = Application.ProductVersion
        sr.Close()
If Not currentVersion = updateVersion Then
' What you want to happen if there is an update
else
' What you want to happen if there isn't an update
End If
Big Big Thanks Man
This is my Code for Visual Basics 2010:

make a new project and add this code:
Code:
Public Class myupdater

    Dim Web As New System.Net.WebClient
    Dim EnteredSerial As String
    Dim newVersion As String = ""
    Dim Retry As Integer


    

    Private Sub myupdater_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            Try


                Dim myVersion As String
                myVersion = My.Computer.FileSystem.ReadAllText("C:\mypath\version.txt")
                ''

                newVersion = Web.DownloadString("http://my.url/version.txt")
                If Not newVersion.Contains(myVersion) Then
                    Label1.ForeColor = Color.Red
                    Label1.Text = "Updating."


                    If My.Computer.FileSystem.DirectoryExists("C:\mypath\") Then
                        If My.Computer.FileSystem.FileExists("C:\mypath\my_Tool.exe") Then
                            IO.File.Delete("C:\mypath\my_Tool.exe")

                            My.Computer.Network.DownloadFile("http://my.url/my_Tool.exe", "C:\mypath\my_Tool.exe")
                            'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                        Else
                            My.Computer.Network.DownloadFile("http://my.url/my_Tool.exe", "C:\mypath\my_Tool.exe")
                            'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                        End If

                        If My.Computer.FileSystem.FileExists("C:\mypath\version.txt") Then
                            IO.File.Delete("C:\mypath\version.txt")

                            My.Computer.Network.DownloadFile("http://my.url/version.txt", "C:\mypath\version.txt")
                            'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                        Else
                            My.Computer.Network.DownloadFile("http://my.url/version.txt", "C:\mypath\version.txt")
                            'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                        End If



                    Else
                        My.Computer.FileSystem.CreateDirectory("C:\mypath\")

                        My.Computer.Network.DownloadFile("http://my.url/my_Tool.exe", "C:\mypath\my_Tool.exe")
                        My.Computer.Network.DownloadFile("http://my.url/version.txt", "C:\mypath\version.txt")

                        'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                    End If


                    System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                    Me.Close()
                Else
                    System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                    'newVersion.Show()
                    Me.Close()
                End If
            Catch Ex As Exception
                MsgBox("Ein Fehler ist aufgetreten:" & vbCrLf & Ex.Message)

            End Try
    End Sub
End Class
Then add this to your main programm:

Under your "Public Class"

Code:
Dim Web As New System.Net.WebClient
    Dim EnteredSerial As String
    Dim newVersion As String = ""
    Dim Retry As Integer
Into your Form1_load:

Code:
Try

                Dim myVersion As String
                myVersion = My.Computer.FileSystem.ReadAllText("C:\mypath\version.txt")
                ''

                newVersion = Web.DownloadString("http://my.url/version.txt")
                If Not newVersion.Contains(myVersion) Then
                                msgBox("A newer Version is available, the Programm will close now.")
                                System.Diagnostics.Process.Start("C:\mypath\Updater.exe")
                                End
                End if
End Try
You just have to change the paths, names, etc.. to yours.
And you have to add a Label.

/done


maybe this helps you?
Quote Originally Posted by Paul View Post
This is my Code for Visual Basics 2010:

make a new project and add this code:
Code:
Public Class myupdater

    Dim Web As New System.Net.WebClient
    Dim EnteredSerial As String
    Dim newVersion As String = ""
    Dim Retry As Integer


    

    Private Sub myupdater_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            Try


                Dim myVersion As String
                myVersion = My.Computer.FileSystem.ReadAllText("C:\mypath\version.txt")
                ''

                newVersion = Web.DownloadString("http://my.url/version.txt")
                If Not newVersion.Contains(myVersion) Then
                    Label1.ForeColor = Color.Red
                    Label1.Text = "Updating."


                    If My.Computer.FileSystem.DirectoryExists("C:\mypath\") Then
                        If My.Computer.FileSystem.FileExists("C:\mypath\my_Tool.exe") Then
                            IO.File.Delete("C:\mypath\my_Tool.exe")

                            My.Computer.Network.DownloadFile("http://my.url/my_Tool.exe", "C:\mypath\my_Tool.exe")
                            'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                        Else
                            My.Computer.Network.DownloadFile("http://my.url/my_Tool.exe", "C:\mypath\my_Tool.exe")
                            'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                        End If

                        If My.Computer.FileSystem.FileExists("C:\mypath\version.txt") Then
                            IO.File.Delete("C:\mypath\version.txt")

                            My.Computer.Network.DownloadFile("http://my.url/version.txt", "C:\mypath\version.txt")
                            'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                        Else
                            My.Computer.Network.DownloadFile("http://my.url/version.txt", "C:\mypath\version.txt")
                            'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                        End If



                    Else
                        My.Computer.FileSystem.CreateDirectory("C:\mypath\")

                        My.Computer.Network.DownloadFile("http://my.url/my_Tool.exe", "C:\mypath\my_Tool.exe")
                        My.Computer.Network.DownloadFile("http://my.url/version.txt", "C:\mypath\version.txt")

                        'System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                    End If


                    System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                    Me.Close()
                Else
                    System.Diagnostics.Process.Start("C:\mypath\my_Tool.exe")
                    'newVersion.Show()
                    Me.Close()
                End If
            Catch Ex As Exception
                MsgBox("Ein Fehler ist aufgetreten:" & vbCrLf & Ex.Message)

            End Try
    End Sub
End Class
Then add this to your main programm:

Under your "Public Class"

Code:
Dim Web As New System.Net.WebClient
    Dim EnteredSerial As String
    Dim newVersion As String = ""
    Dim Retry As Integer
Into your Form1_load:

Code:
Try

                Dim myVersion As String
                myVersion = My.Computer.FileSystem.ReadAllText("C:\mypath\version.txt")
                ''

                newVersion = Web.DownloadString("http://my.url/version.txt")
                If Not newVersion.Contains(myVersion) Then
                                msgBox("A newer Version is available, the Programm will close now.")
                                System.Diagnostics.Process.Start("C:\mypath\Updater.exe")
                                End
                End if
End Try
You just have to change the paths, names, etc.. to yours.
And you have to add a Label.

/done


maybe this helps you?
thnx man
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?