Social Icons

Tuesday, 8 May 2012

Auto Updater for your client! [VB]

I made this in vb.net because I haven't seen one before... and this is good for those of you that have client for sale, or want to keep theirs private for friends... in this way you can apply an hwid, whatever you want


+ no one will get the updated client unless they have this tool.

This isn't for the mods you guys usually use, its for clients!


Code:
Imports System.Net
Imports System.Text
Imports System****


Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

       'Written by iolaka
        Dim location As String = Environ("AppData")
        Dim second As String = location & "\.minecraft\bin\"
        Dim web As New WebClient
        Dim iolaka= web.DownloadString("*******link/updater/version.dat")

        If iolaka > My.Settings.current Then
            My.Settings.current = iolaka
            Kill(second & "minecraft.jar")
            MsgBox("Update found... Downloading new version... Please wait...", MsgBoxStyle.Information, "Update")
            My.Computer.Network.DownloadFile("*******link/updater/minecraft.jar", second & "minecraft.jar")
            MsgBox("yourclient updated!", MsgBoxStyle.Information, "Update")
        Else
            MsgBox("There are no new updates. You have the latest version of yourclient.", MsgBoxStyle.Critical, "Update")
        End If
    End Sub

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

    End Sub
End Class

The way this works:

Make a new ******* folder called update


Inside add 2 new files:
your minecraft jar
a .dat file saying 1.0.0


Now, 1.0.0 is the default version so...

when you first run the program it will say No new update is available


But if you change the 1.0.0 to 1.0.1 and upload a new jar to your ******* folder, it will update and aytomatically replace jars.








Credit to:-john404 

No comments:

Post a Comment