Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''''''''''''''''''''''''''''
- ' Updater Snippet '
- ' '
- ' Creator : John '
- ' Date : 17/12/2011 '
- ' Site : FiveStarGamerz.com '
- ' '
- ' '
- ' Enjoy :D '
- '''''''''''''''''''''''''''''
- Imports System.Net
- Imports System.IO
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim CurrentFileVersion As String = My.Application.Info.Version.ToString
- Dim NewVersionFile As String = Application.StartupPath & "/version.txt"
- Dim AppFile As String = Application.StartupPath & "/Youtube Updater Tut.exe"
- If My.Computer.FileSystem.FileExists(NewVersionFile) Then
- My.Computer.FileSystem.DeleteFile(NewVersionFile)
- End If
- My.Computer.Network.DownloadFile("", NewVersionFile)
- Dim ReadVersion As String = My.Computer.FileSystem.ReadAllText(NewVersionFile)
- If Not CurrentFileVersion = ReadVersion Then
- MsgBox("Update Available")
- My.Computer.Network.DownloadFile("", AppFile)
- MsgBox("Download Saved In" & Application.StartupPath & AppFile)
- Else
- MsgBox("Program Is Up To Date")
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement