[HILFE] Visual Basic Launcher Login

03/05/2012 14:15 ManuelDerErste#1
Hallo Leute!
Ich habe für meinen Server einen eigenen VB Minecraft Launcher erstellt!
So weit funktioniert alles bestens bis ich meine Daten eingebe und auf Login drücke...

Es erscheint folgende Fehlermeldung:
"Die Datei wurde nicht gefunden"

Das ganze passiert in dieser Zeile:
Shell(Environment.SpecialFolder.ApplicationData & "\.minecraft\bin\minecraft.jar" & benutzername.Text & " " & passwort.Text)

Ich hoffe ihr könnt mir weiterhelfen. Ich brauche die Lösung ziemlich schnell!

Danke,
Liebe Grüße
CrafterzOfficial

P.S. Hier ist der ganze Code:
Code:
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim Update As New Net.WebClient

        If Environment.SpecialFolder.ApplicationData & "\.minecraft\minecraft.jar" = Nothing Then
            Update.DownloadFile("https://s3.amazonaws.com/MinecraftDownload/launcher/Minecraft.exe", Environment.SpecialFolder.ApplicationData & "\.minecraft\bin\minecraft.jar")
        End If
    End Sub
    Private Sub login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles login.Click
        Dim Update As New Net.WebClient

        If benutzername.Text = "" Then
            MsgBox("Bitte gib deinen Benutzernamen ein!")
        Else
            If benutzername.Text = "Username" Then
                MsgBox("Bitte gib deinen Benutzernamen ein!")
            Else
                If passwort.Text = "" Then
                    MsgBox("Bitte gib dein Passwort ein!")
                Else
                    If passwort.Text = "pwdummy" Then
                        MsgBox("Bitte gib dein Passwort ein!")
                    Else
                        If forceupdate.Checked Then
                            Update.DownloadFile("http://launcher.minamy.de/bin/minecraft.jar", Environment.SpecialFolder.ApplicationData & "\.minecraft\bin\minecraft.jar")
                            MessageBox.Show("Minecraft wurde Upgedatet!")
                        Else
                            If aufserver.Checked Then
                                Shell(Environment.SpecialFolder.ApplicationData & "\.minecraft\bin\minecraft.jar" & benutzername.Text & " " & passwort.Text & "mc.minamy.de")
                            Else
                                Shell(Environment.SpecialFolder.ApplicationData & "\.minecraft\bin\minecraft.jar" & benutzername.Text & " " & passwort.Text)
                            End If
                        End If
                    End If
                End If
            End If
        End If
    End Sub
    Private Sub benutzernamen_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles benutzername.KeyPress
        If e.KeyChar = Chr(13) Then
            e.Handled = True
            login.PerformClick()
        End If
    End Sub
    Private Sub passwort_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles passwort.KeyPress
        If e.KeyChar = Chr(13) Then
            e.Handled = True
            login.PerformClick()
        End If
    End Sub
End Class
03/05/2012 15:26 False#2
Ich glaube hier wäre es passender : [Only registered and activated users can see links. Click Here To Register...] .
Ansonsten lad bitte mal dein Projekt hoch dann kann man es glaube ich besser nach voll ziehen.
03/05/2012 16:51 Der-Eddy#3
Verschoben
03/05/2012 17:04 Kraizy​#4
Na laut Fehlermeldung hast du keine Datei die den Text deiner User-und Passtextboxen enthält..
Außerdem ist Shell noch aus VB6, benutz stattdessen Process.Start und übergib die nötigen Parameter.
03/05/2012 20:55 ManuelDerErste#5
Quote:
Originally Posted by xKraizy View Post
Na laut Fehlermeldung hast du keine Datei die den Text deiner User-und Passtextboxen enthält..
Außerdem ist Shell noch aus VB6, benutz stattdessen Process.Start und übergib die nötigen Parameter.
SO! Habs jetzt versucht anders zu machen!

Hier der Code:
Code:
Public Class Launcher


    Private Sub Login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login.Click
        If Passram.Checked = True Then
            Dim Sw As New System.IO.StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\login")
            Sw.WriteLine(IDtxt.Text)
            Sw.WriteLine(Passtxt.Text)
            Sw.Close()
            Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\minecraft.exe", IDtxt.Text & " " & Passtxt.Text)
        ElseIf Passram.Checked = False Then
            Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\minecraft.exe", IDtxt.Text & " " & Passtxt.Text)
        End If
        End
    End Sub

    Private Sub Need_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles Need.LinkClicked
        Process.Start("http://www.minecraft.net/register")
    End Sub

    Private Sub Launcher_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If System.IO.File.Exists("Minecraft Launcher New.exe") = True Then
            MsgBox("Bitte entferne den 'New' Namen und starte den Launcher!", MsgBoxStyle.Exclamation)
            End
        ElseIf System.IO.File.Exists("Minecraft Launcher New.exe") = False Then
            If System.IO.File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\vbversion") = True Then
                My.Computer.Network.DownloadFile("http://crafterz.western-it.com/update/vbversion", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\vbversion")
                Dim vn As New System.IO.StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\vbversion")
                Dim vni As New System.IO.StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\vbversion")
                Dim nk As String
                Dim nki As String
                nk = vn.ReadLine
                nki = vni.ReadLine
                vn.Close()
                vni.Close()
                Kill(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\vbversion")
                If nk < nki Then
                    MsgBox("Ein Update ist verfügbar!", MsgBoxStyle.Information)
                End If
            End If
            If System.IO.File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\vbversion") = False Then
                MsgBox("Das Spiel wurde noch nicht heruntergeladen!", MsgBoxStyle.Exclamation)
            End If
            If System.IO.File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\login") Then
                Passram.Checked = True
                Dim sr As New System.IO.StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\login")
                IDtxt.Text = sr.ReadLine
                Passtxt.Text = sr.ReadLine
                sr.Close()
            End If
        End If
    End Sub

    Private Sub options_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles options.Click
        MsgBox("Update wird jetzt durchgeführt ...", MsgBoxStyle.Information)
        If System.IO.File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\vbversion") = True Then
            Kill(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\vbversion")
            Kill(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\minecraft.exe")
            My.Computer.Network.DownloadFile("https://s3.amazonaws.com/MinecraftDownload/launcher/Minecraft.exe", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\minecraft.exe")
            My.Computer.Network.DownloadFile("http://crafterz.western-it.com/update/vbversion", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\vbversion")
        ElseIf System.IO.File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\vbversion") = False Then
            My.Computer.Network.DownloadFile("https://s3.amazonaws.com/MinecraftDownload/launcher/Minecraft.exe", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\minecraft.exe")
            My.Computer.Network.DownloadFile("http://crafterz.western-it.com/update/vbversion", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.crafterz\bin\vbversion")
        End If
        MsgBox("Update abgeschlossen!", MsgBoxStyle.Information)
        MsgBox("Lösch bitte den alten Launcher und nenne den neuen Launcher, Launcher", MsgBoxStyle.Exclamation)
        End
    End Sub

    Private Sub News_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles News.DocumentCompleted

    End Sub
End Class
Das Problem ist wenn ich mich anmelde mit meinen daten das mein Launcher den normalen launcher startet...

Wie kann ich das machen das der Launcher das Spiel startet und nicht den normalen Launcher?
03/05/2012 20:57 Kraizy​#6
Dann starte den Client mit den richtigen Parametern, anstatt den Launcher.
03/05/2012 20:59 ManuelDerErste#7
Quote:
Originally Posted by xKraizy View Post
Dann starte den Client mit den richtigen Parametern, anstatt den Launcher.
Das hilft mir nicht viel weiter... wie meinst du das, mit den richtigen Parametern starten? Geht das vielleicht irgendwie das mein Client auf die minecraft.jar im bin ordner zugreifen kann und so das spiel starten kann?
05/18/2012 12:11 xdupr0#8
Quote:
Originally Posted by xKraizy View Post
Na laut Fehlermeldung hast du keine Datei die den Text deiner User-und Passtextboxen enthält..
Außerdem ist Shell noch aus VB6, benutz stattdessen Process.Start und übergib die nötigen Parameter.
Quatsch, Shell und Process.Start sind nicht das gleiche.
05/18/2012 13:03 Kraizy​#9
Quote:
Originally Posted by xdupr0 View Post
Quatsch, Shell und Process.Start sind nicht das gleiche.
Wo siehst du in meinem Beitrag das Wort "gleich"?