CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2009
    Posts
    2

    Question 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

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    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.

  3. #3
    Join Date
    Apr 2009
    Posts
    2

    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

  4. #4
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: I need help with finding and opening wow.exe with VB

    [ Moved to VB.NET ]

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: I need help with finding and opening wow.exe with VB

    Quote Originally Posted by krazychild View Post
    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?

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    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
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    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")

  8. #8
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: I need help with finding and opening wow.exe with VB

    Works fine under Vista...
    Code:
    d:/VB6 Samples
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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
  •  





Click Here to Expand Forum to Full Width

Featured