Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
Tried to add path but bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Grünewald committed Dec 28, 2015
1 parent 137a6f5 commit a10ea54
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
21 changes: 13 additions & 8 deletions SteamCMDui/Form1.vb
Expand Up @@ -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")

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -178,7 +181,7 @@ Public Class Form1
End If
End If

RW = RW + 1
RW = RW + 1

End While
End Sub
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
3 changes: 1 addition & 2 deletions SteamCMDui/My Project/Application.myapp
Expand Up @@ -6,6 +6,5 @@
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>0</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>
</MyApplicationData>

0 comments on commit a10ea54

Please sign in to comment.