what should I do?
what should I do?
Well you can't explicity check if a string is a boolean value. s.Equals("TRUE") might be what you're looking for.
Looking at the next bit, you want this:
And replace in the startgame() function the lineCode:If Not s = ""
withCode:Return False
Hope that helps.Code:Return ""
I did not understand you correctly, I'm sorry, can you please fill in how you mean and mark the new things with Bold so I can easly see what you changed!
Code:Dim s As String = startgame() If Not s = False Then My.Settings.wow = s My.Settings.Save() Else Exit Sub End If End Sub Function startgame() Try Dim installpath As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\blizzard entertainment\world of warcraft\", "installpath", Nothing) Dim proc As Process = System.Diagnostics.Process.Start(installpath + "WoW.exe") Return installpath Catch Return False End Try End Function
Sure
Hope that helps!Code:Dim s As String = startgame() If Not s = "" Then My.Settings.wow = s My.Settings.Save() Else Exit Sub End If End Sub Function startgame() Try Dim installpath As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\blizzard entertainment\world of warcraft\", "installpath", Nothing) Dim proc As Process = System.Diagnostics.Process.Start(installpath + "WoW.exe") Return installpath Catch Return "" End Try End Function
Thanks a lot, it did work! +Rep