Hi everyone, This is my first guide that I have ever done that relates to World of Warcraft and I am unsure if this is the write forum section for this. Basically, I will show you how to make a simple launcher that will change the realmlist.wtf and allow you to launch the WoW.exe
Like I said this is my first guide, So please do easy on me.
For this guide, I would expect readers to know at least a little bit about Visual Basic 6 and how to navigate through the program. (yes, I know Visual Basic 6 is old, But that's how I roll.)
First off, Let's create a New Standard Exe

Then click "Open"
Now then. This will bring up an interface that allows you to basically drag and drop different controls onto your form/application.
Select the CommandButton control and add two buttons. (These will serve as a button for patching the realmlist.wtf and the other for launching WoW.exe)
Now Double Click on the first button. It will bring up a text based interface that will allow you to add/edit bits of codes. You should see:
Code:
Private Sub Command1_Click()
End Sub
Above that. Let's first add some goodies to help us with saving the realmlist.wtf and launching wow.
Add the following bit of code before the Private Sub Command1
Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
' Open the default browser on a given URL
' Returns True if successful, False otherwise
Public Function OpenBrowser(ByVal URL As String) As Boolean
Dim res As Long
' it is mandatory that the URL is prefixed with http:// or https://
If InStr(1, URL, "http", vbTextCompare) <> 1 Then
URL = "http://" & URL
End If
res = ShellExecute(0&, "open", URL, vbNullString, vbNullString, _
vbNormalFocus)
OpenBrowser = (res > 32)
End Function
Public Function SaveFileFromTB(txtRealm As String, _
FilePath As String, Optional Append As Boolean = False) _
As Boolean
'PURPOSE: Saves contents of text control (e.g., Text Box,
'Rich Text Box) specified by TxtBox to file specified by FilePath
'If Append = true, then TxtBox's contents are
'appended to existing file contents
'else existing file is overwritten
'Returns: True if Successful, false otherwise
Dim iFile As Integer
iFile = FreeFile
If Append Then
Open FilePath For Append As #iFile
Else
Open FilePath For Output As #iFile
End If
Print #iFile, txtRealm
SaveFileFromTB = True
ErrorHandler:
Close #iFile
End Function
So you code should currently look as such
Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
' Open the default browser on a given URL
' Returns True if successful, False otherwise
Public Function OpenBrowser(ByVal URL As String) As Boolean
Dim res As Long
' it is mandatory that the URL is prefixed with http:// or https://
If InStr(1, URL, "http", vbTextCompare) <> 1 Then
URL = "http://" & URL
End If
res = ShellExecute(0&, "open", URL, vbNullString, vbNullString, _
vbNormalFocus)
OpenBrowser = (res > 32)
End Function
Public Function SaveFileFromTB(txtRealm As String, _
FilePath As String, Optional Append As Boolean = False) _
As Boolean
'PURPOSE: Saves contents of text control (e.g., Text Box,
'Rich Text Box) specified by TxtBox to file specified by FilePath
'If Append = true, then TxtBox's contents are
'appended to existing file contents
'else existing file is overwritten
'Returns: True if Successful, false otherwise
Dim iFile As Integer
iFile = FreeFile
If Append Then
Open FilePath For Append As #iFile
Else
Open FilePath For Output As #iFile
End If
Print #iFile, txtRealm
SaveFileFromTB = True
ErrorHandler:
Close #iFile
End Function
Private Sub Command1_Click()
End Sub
For the Private Sub Command1_Click Let's tidy this up so that it will patch the realmlist.wtf
Code:
Private Sub Command1_Click()
SaveFileFromTB "set realmlist", App.Path + "\realmlist.wtf"
End Sub
Edit: set realmlist - This should be changed to reflect your realmlist. ( in the format of set realmlist cheese.bounceme.net within the quotation marks.)
Now for the second button to launch wow.exe
Code:
Private Sub Command2_Click()
Shell (App.Path + "\WoW.exe")
Unload Me
End Sub
That is basically it. Now file save as.. name your project.. Yes i know its not a looker but I will surely write a tutorial on making a GUI for your launcher.
Remember that for this to work. it needs to be placed in the default/root World of Warcraft directory.(Commonly C:\World of Warcraft or C:\Program Files\World of Warcraft.
Post questions if you have any.