-
April 30th, 2009, 09:17 AM
#1
I need help with finding and opening wow.exe with VB
I can't find out how to find and open the program wow.exe using VB.
I can get it to open mine but it can't open other peoples they get errors when they try, I have xp and the Vista and other people can't get it to open theirs so I need to know how to find the file then open it.
The code I'm using is this:
Private Sub Play_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Play.Click
Dim installpath As String = String.Empty
installpath = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\blizzard entertainment\world of warcraft", "installpath", Nothing)
If IO.Directory.Exists(installpath & "/cache") Then
IO.Directory.Delete(installpath & "/cache", True)
End If
Dim fs As New IO.FileStream("realmlist.***", IO.FileMode.Create, IO.FileAccess.Write)
Dim s As New IO.StreamWriter(fs)
Dim path As String = ("HKEY_LOCAL_MACHINE\SOFTWARE\blizzard entertainment\world of warcraft")
s.WriteLine("set realmlist us.version.worldofwarcraft.com")
s.Close()
Process.Start("c:/program files/world of warcraft/wow.exe")
End Sub
-
April 30th, 2009, 11:34 AM
#2
Re: I need help with finding and opening wow.exe with VB
Looks like Dot Net code but is posted in VB6 section of the forum.
I see you retrieve the install path but then have the location hard coded?
Not sure what you are trying to do with the filestream and stream writer but I do not see a path provided.
-
April 30th, 2009, 12:45 PM
#3
Re: I need help with finding and opening wow.exe with VB
it works on my comp but no one elses and the file stream i have it to set realm list
-
April 30th, 2009, 02:23 PM
#4
Re: I need help with finding and opening wow.exe with VB
-
April 30th, 2009, 03:57 PM
#5
Re: I need help with finding and opening wow.exe with VB
Originally Posted by krazychild
it works on my comp but no one elses and the file stream i have it to set realm list
The fact that you have hard coded the paths may very well be an issue here. I do not understand why you would do that though since you have already put in code to determine where the files are installed why not use it?
-
April 30th, 2009, 07:05 PM
#6
Re: I need help with finding and opening wow.exe with VB
You could use POWERSHELL, but the users would also need it, although it's becoming more common on newer systems
-
May 2nd, 2009, 01:38 AM
#7
Re: I need help with finding and opening wow.exe with VB
Shouldn't this part
Code:
Process.Start("c:/program files/world of warcraft/wow.exe")
be :
Code:
Process.Start("c:\program files\world of warcraft\wow.exe")
-
May 2nd, 2009, 10:31 AM
#8
Re: I need help with finding and opening wow.exe with VB
Works fine under Vista...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|