May 19th, 2009

Addon Versions is a small application I wrote for Kitn and I. Its sole purpose is to just show you what WoW addons you have installed, what version they are, and what interface version it was made for.  With all the hoohaa lately about the addon updaters I recently went back to doing manual updates, so this program is made to make the manual updater’s life a tad bit easier.

With a click of a button it will sit on top of all other windows (i.e. your web browser) so while your looking for the downloads you can still see the list.

I know people are a little warey of programs which go anywhere near the WoW folder so I am releasing the source for all to see.  And will disclose exactly what the program does.

Addon Versions
Interface Screenshot

Ok, so here is how it works.  When the program loads it tries to read from your registry in order to collect the saved location of your addon folder.  If its the first time you’ve run the program it wont find anything, so it will create a registry key.  Once loaded, you click on the top white box to tell it where the addons folder is located.  When you do this, the program saves that path to the registry so you don’t have to do it every time.

When you hit the Scan button it tries to read from a .Toc file from each of the folders in order to collect the information you need.  Thats it, it does nothing else at all.  If you’re still concerned feel free to check out the source code.

If you think this program will be useful for you then please feel free to snag it below:

93 Downloads : Addon Versions 1.0 1.06 MB

And now on to the nitty gritty part, the source.  The following is the complete source code for the application written in VB.net.

Imports Microsoft.Win32
Imports System.IO
Public Class Form1

Private Sub lblPath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblPath.Click
FB.ShowDialog()
lblPath.Text = FB.SelectedPath

Try
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("Software\AddonVersions", True)
regKey.SetValue("AddonFolder", FB.SelectedPath)
regKey.Close()
Catch ex As Exception
End Try
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim regKey As RegistryKey
Dim AddonFolder As String
Try
regKey = Registry.LocalMachine.OpenSubKey("Software\AddonVersions", True)
AddonFolder = regKey.GetValue("AddonFolder")
lblPath.Text = AddonFolder
regKey.Close()
Catch ex As Exception
'Key Doesnt Exist So Create
regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
regKey.CreateSubKey("AddonVersions")
regKey.Close()
End Try

End Sub

Private Sub ButScan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButScan.Click
Dim BaseFolder As New DirectoryInfo(lblPath.Text)

If BaseFolder.Exists Then
ListView1.Items.Clear()
For Each SubF In BaseFolder.GetDirectories()

Dim strContents As String
Dim AddonInterface As String = ""
Dim AddonName As String = ""
Dim AddonVersion As String = ""
Dim objReader As StreamReader
Try
Dim TocFile As New FileInfo(SubF.FullName & "\" & SubF.Name & ".toc")
If TocFile.Exists Then
objReader = New StreamReader(SubF.FullName & "\" & SubF.Name & ".toc")
Do While Not objReader.EndOfStream
strContents = objReader.ReadLine
If InStr(strContents, "## Title:") Then
AddonName = Strings.Right(strContents, strContents.Length - 10)
End If
If InStr(strContents, "## Version:") Then
AddonVersion = Strings.Right(strContents, strContents.Length - 12)
End If
If InStr(strContents, "## Interface:") Then
AddonInterface = Strings.Right(strContents, strContents.Length - 14)
End If
Loop
objReader.Close()
AddonInterface = Strings.Left(AddonInterface, 1) & "." & Strings.Left(Strings.Mid(AddonInterface, 2), 1) & "." & Strings.Left(Strings.Mid(AddonInterface, 3), 1)
If AddonName = "" Then AddonName = SubF.Name

With ListView1.Items.Add(AddonName)
.SubItems.Add(AddonVersion)
.SubItems.Add(AddonInterface)
End With
End If

Catch Ex As Exception
End Try
Next
Else
MsgBox("Cannot Find Folder : " & lblPath.Text)
End If
End Sub

Private Sub ButOnTop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButOnTop.Click
If ButOnTop.Text = "Always On Top" Then
Me.TopMost = True
ButOnTop.Text = "Back To Normal"
Else
Me.TopMost = False
ButOnTop.Text = "Always On Top"
End If
End Sub
End Class

Feel free to comment, and hope this is useful to any other manual updaters like us.


Similar Posts

1
Jeania

I was going to reply via WoWI but I had to click the link to read up more info so, what the hey, here I am ^^

One thing I’m extremely interested in is exporting that list. I may be reformatting my computer (or even if I don’t, I’d like to keep a list) and as I have so many addons, this would make it much easier to know what I did have (so that I can update them again).

I’m also hoping that there can be two versions (or whatnot) for export, as a text one I can add to myself various notes, such as: where I got it, what I use it for, etc. I do have AddonManager, but when I go to look at the output, I have to use Textpad or it scurries all over the place. And it scrolls on forever lol (even on Textpad lol).

I like the easy view of this paticular one, and it’d be a great help to me. I recently zipped up a copy of my addon folders but… yeah, it’s still very large (and a list would also help me to ‘cut down’ my amount…I have a few addons that don’t mesh with others, and I just turn them off because I always am ‘going to clean them up’ and never do lol). That’s part of why the ‘notes’ ability would greatly help. (That and many addon authors update at more than one site, but sometimes the versions aren’t the same..I could compare and put the primary for myself to get them from…this would make it easier anyways to know whether to put them in the curse or minion’s list for updating as well).

I truly hope to hear back, either here or my email (preferable, so I don’t miss it). Thank you so much, I truly appreciate it ^_^

2

Hi Jeania,

Thanks for stopping by! You know, I never knew that so many people would use this program! I just made it as my partner in crime, the Kitn, wanted something like this.

The export feature you would like sounds easy enough and shouldn’t be too hard to fix in for you, however, the other feature about making notes could be a possibility, but the only way I could figure doing so right this minute would be to write the notes back to each addon which is something I would rather not do (people might not like that the program changes anything in the addon folder). But you never know! I might figure something out!

I too re-formatted my computer… unfortunately the source code to this program was something I forgot to backup ^^; (yeah yeah I got the Kitn telling me “I told you….”), but it shouldn’t be too hard to patch it back together :)

I’ll pop this in an email to you also and will get to working on it real soon.

3

All done! I’ve added the export feature for you and you can grab either from here or over at wowinterface, enjoy!

Post a comment.