proskater123 Posted November 24, 2008 Posted November 24, 2008 I am making a world of warcraft launcher that needs to look to see if the client is running the latest version. Then look on a server either through http (html, php, xml) file or through ftp. If the client isn't the latest then it would ask if the user would like to download then where too. Some extras that would be great: Progress bar as the file downloads, weather or not the player wants the file to download while they are playing world of warcarft (file c:/world of warcraft/wow.exe ) thanks again for the help =] Quote
Apache Posted November 25, 2008 Posted November 25, 2008 Is this for a private server? The Launcher.exe file does all that anyway. Unless you're updating the patch through your own FTP (Like the Underworld Private Server's custom patch) then you have to authenticate with the Blizzard server to grab the patch from them. Quote
Apache Posted November 25, 2008 Posted November 25, 2008 If it is for a private server, here's a simple VB Class to change the Realmlist in WOTLK (It's changed since 2.4.3) Form Layout: 3 Buttons: btnLaunch btnPrivate btnRetail Imports System.Text.Encoding Public Class Form1 'CHANGE THIS VALUE' Public strYOUR_PRIVATE_REALM_LIST As String = "<URL>" Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Remove this IF statement when realmlist changed. If strYOUR_PRIVATE_REALM_LIST = "<URL>" Then btnLaunch.Enabled = False btnPrivate.Enabled = False btnRetail.Enabled = False End If End Sub Private Sub btnLaunch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLaunch.Click Process.Start("C:\Program Files\World Of Warcraft\WoW.exe") End Sub Private Sub btnRetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRetail.Click SetRealmList("Retail") End Sub Private Sub btnPrivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrivate.Click SetRealmList("Private") End Sub Private Sub SetRealmList(ByVal e As String) Dim strDATA As String = My.Computer.FileSystem.ReadAllText("C:\Program Files\World Of Warcraft\WTF\Config.wtf", ASCII) Dim strOUT_TEXT As String = "" Select Case e Case "Retail" strOUT_TEXT = Replace(strDATA, strYOUR_PRIVATE_REALM_LIST, "eu.logon.worldofwarcraft.com") Case "Private" strOUT_TEXT = Replace(strDATA, "eu.logon.worldofwarcraft.com", strYOUR_PRIVATE_REALM_LIST) End Select My.Computer.FileSystem.WriteAllText("C:\Program Files\World Of Warcraft\WTF\Config.wtf", strOUT_TEXT, 0) End Sub End Class Quote
proskater123 Posted November 29, 2008 Author Posted November 29, 2008 I have my own code. I just need some code that will update to the latest patch. And yes its for a private server. Quote
Apache Posted December 8, 2008 Posted December 8, 2008 so long as you just change the realmlist and leave the patchlist as it stands, the client should automatically update as it goes. Which emulator are you running, ManGos can throw huge fits is the client is too new. I haven't really use Ascent since it was Antrix. I know Antrix liked it's client to be as up to date as possible. With either if you set you config file to maxbuild=99999 then you shouldn't have too many problems with version conflicts. I wouldn't worry too much about coding your program to version check, it's an integral part of the client and the client itself will tell you if it needs upgrading, there should be no reason to check it third party. Quote
dr0p Posted December 8, 2008 Posted December 8, 2008 You can use the UrlDownloadToFile() API to download the update and then just use the Shell() command to run it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.