From a10ea541b98f05ebfa14b6703ea4dcf98117047b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Gr=C3=BCnewald?= Date: Mon, 28 Dec 2015 21:31:26 +0100 Subject: [PATCH] Tried to add path but bug --- SteamCMDui/Form1.vb | 21 +++++++++++++-------- SteamCMDui/My Project/Application.myapp | 3 +-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/SteamCMDui/Form1.vb b/SteamCMDui/Form1.vb index 1cd3296..e2cbaf8 100644 --- a/SteamCMDui/Form1.vb +++ b/SteamCMDui/Form1.vb @@ -71,12 +71,15 @@ Public Class Form1 Dim RW As Integer = 0 Dim TempString As String Dim TempStrArr() As String + Dim SteamCMDPath As String = System.Windows.Forms.Application.StartupPath + "\SteamCMD.exe" Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load + Debug.Print(System.Windows.Forms.Application.StartupPath) + 'SteamCMD Check - If Not My.Computer.FileSystem.FileExists(My.Application.Info.DirectoryPath + "\SteamCMD.exe") Then + If Not My.Computer.FileSystem.FileExists(SteamCMDPath) Then MsgBox("Please put this Programm in the same folder as SteamCMD", MsgBoxStyle.OkOnly & MsgBoxStyle.Critical, "Error") @@ -145,7 +148,7 @@ Public Class Form1 Try - Process.Start(New ProcessStartInfo(My.Application.Info.DirectoryPath + "\SteamCMD.exe", TempString)) + Process.Start(New ProcessStartInfo(SteamCMDPath, TempString)) Catch ex As Exception @@ -178,7 +181,7 @@ Public Class Form1 End If End If - RW = RW + 1 + RW = RW + 1 End While End Sub @@ -250,7 +253,7 @@ Public Class Form1 Try - Process.Start(New ProcessStartInfo(My.Application.Info.DirectoryPath + "\SteamCMD.exe", TempString)) + Process.Start(New ProcessStartInfo(SteamCMDPath, TempString)) Catch ex As Exception @@ -305,7 +308,8 @@ Public Class Form1 End If - TempString = My.Application.Info.DirectoryPath + "\SteamCMD.exe " + TempString + vbCrLf + 'TempString = SteamCMDPath + "\SteamCMD.exe " + TempString + vbNewLine + TempString = "SteamCMD.exe " + TempString + vbNewLine If My.Computer.FileSystem.FileExists(SaveFileDialog1.FileName) Then @@ -323,7 +327,7 @@ Public Class Form1 Try 'Write in file - My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, TempString, True) + My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, TempString, False) Catch ex As Exception @@ -368,7 +372,8 @@ Public Class Form1 End If - TempString = My.Application.Info.DirectoryPath + "\SteamCMD.exe " + TempString + vbCrLf + 'TempString = SteamCMDPath + "\SteamCMD.exe " + TempString + vbNewLine + TempString = "SteamCMD.exe " + TempString + vbNewLine If My.Computer.FileSystem.FileExists(SaveFileDialog1.FileName) Then @@ -386,7 +391,7 @@ Public Class Form1 Try 'Write in file - My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, TempString, True) + My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, TempString, False) Catch ex As Exception diff --git a/SteamCMDui/My Project/Application.myapp b/SteamCMDui/My Project/Application.myapp index 1243847..0f12f32 100644 --- a/SteamCMDui/My Project/Application.myapp +++ b/SteamCMDui/My Project/Application.myapp @@ -6,6 +6,5 @@ 0 true 0 - 0 true - + \ No newline at end of file