Well.. Umm Auto Patching...???!!??

Posts 1–9 of 9 · Page 1 of 1
Well.. Umm Auto Patching...???!!??
Well i was thinking about an auto patching system for example if i made a program and i want to make a patcher for it so.. if for example i made a program and gave it to 2 of my friends and i made an update from my computer how can this update apply to the same program they have for example(lots of for examples ) CrossFire or CombatArms or what ever games are on earth when you open them sometimes they dont download any files from their patcher because THEIR DEVELOPERS DIDNT MAKE AN UPDATE FROM THEIR PC while vice versa when THEIR DEVELOPERS MAKE AN UPDATE FROM THEIR PC the patcher auto downloads it! any one has an idea of how to make something like wise?
You need a website where you can store and edit files and documents and where you can directly download files (e.g. webs)

1. Make a text document where it will be used to store the version of the program. Then read the text document (as a string)
2. Upload the updated program

Example Code :
Code:
   Public Sub CheckUpdate()
        Dim Netw As New Net.WebClient
        Dim Version As String = "Version 1.0"

        'If Program version is not equal to the updated version at the text document then,
        If Not Version = System.Text.Encoding.ASCII.GetString((Netw.DownloadData("http://mysite.com/MyProgram/Info/Version.txt"))) Then
            MsgBox("A new version of the program is available!")
            DownloadUpdate()
        Else 'If it is the same.
            MsgBox("The program is updated!")
            'Codes here when its up to date  ( You can leave it blank )
        End If
    End Sub

    Public Sub DownloadUpdate()
        'Download the update by using this code
        My.Computer.Network.DownloadFile("http://mysite.com/MyProgram/Program.exe", "C:/Program Files/MyProgram/Program.exe")
    End Sub
In my way, I use to download the updated program to the Temp Folder and remove the old files at the folder where it is located then copy the files itself to the folder.

Just like what the other installers do.
• Updated programs are temporarily stored at the Temp folder
• Remove outdated files at the program's directory ( where it is installed )
• Copy the program to the directory
Quote Originally Posted by .Yuzuru View Post
You need a website where you can store and edit files and documents and where you can directly download files (e.g. webs)

1. Make a text document where it will be used to store the version of the program. Then read the text document (as a string)
2. Upload the updated program

Example Code :
Code:
   Public Sub CheckUpdate()
        Dim Netw As New Net.WebClient
        Dim Version As String = "Version 1.0"

        'If Program version is not equal to the updated version at the text document then,
        If Not Version = System.Text.Encoding.ASCII.GetString((Netw.DownloadData("http://mysite.com/MyProgram/Info/Version.txt"))) Then
            MsgBox("A new version of the program is available!")
            DownloadUpdate()
        Else 'If it is the same.
            MsgBox("The program is updated!")
            'Codes here when its up to date  ( You can leave it blank )
        End If
    End Sub

    Public Sub DownloadUpdate()
        'Download the update by using this code
        My.Computer.Network.DownloadFile("http://mysite.com/MyProgram/Program.exe", "C:/Program Files/MyProgram/Program.exe")
    End Sub
I ll give it a shot! but... about the .txt document dont you think that the use might edit it?
The site that you'll be using should have the option to edit the text document online.
I use webs because it allows you to edit it online and it also upload files/download files directly.

I don't know yet other sites that are like that.
Quote Originally Posted by .Yuzuru View Post
The site that you'll be using should have the option to edit the text document online.
I use webs because it allows you to edit it online and it also upload files/download files directly.

I don't know yet other sites that are like that.
Well i am using our community Forum! i will not share links here its not allowed but.. i am not using webs

If you think its neccasary to use webs for this patcher its ok for me
What's important that it can download the updated program directly ( instant download )
And the text document where you store the version of the updated program.
Quote Originally Posted by .Yuzuru View Post
What's important that it can download the updated program directly ( instant download )
And the text document where you store the version of the updated program.
well i need a small discussion about that webs thing and the relation to the .txt file


---------- Post added 09-29-2012 at 12:36 AM ---------- Previous post was 09-28-2012 at 11:55 PM ----------

@.Yuzuru
can you please tell me the way of uploading the .txt doc to webs?
Go to the File Manager and you can now upload there your files.
members<dot>webs<dot>com/s/manager/filemanager

You know what to do from there.
Be aware that Self-Patching on MPGH is not supported, because all applications need to go through approving.

Also, You could just check if the .exe match with the ones on the Web and update. (bytes, hash, w/e) There is no need to use a version file.
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?