Hi
need to add a WAITFOREXIT to my code before it can move on, my code;
Any help, thanks.
need to add a WAITFOREXIT to my code before it can move on, my code;
Code:
Public Class Form1
Dim file_name As String = "./Start/PostInstall.txt"
Dim stream_reader As New IO.StreamReader(file_name)
Dim line As String
Dim ReadResult() As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
line = stream_reader.ReadLine() 'Read PostInstall.txt File
Dim ProgCount = 0
Do While Not (line Is Nothing)
ReadResult = line.Split(":") 'Split line at :
'Display name of program and run it
For i As Integer = 0 To ReadResult.Length - 1
Console.WriteLine(ReadResult(i))
If (ReadResult(0).ToLower() = "prog name") Then
Label3.Text = "Installing " + ReadResult(1)
End If
If (ReadResult(0).ToLower() = "installer file") Then
If (System.IO.File.Exists(ReadResult(1))) Then
Label4.Text = "path: " & ReadResult(1)
'Label5.Text = "Progress: " + ((1.0F / (ProgCount * 1.0F)) * 100) + "%"
System.Diagnostics.Process.Start(ReadResult(1))
Else
MessageBox.Show("Something is wrong! File = " & ReadResult(1))
End If
End If
Next
'Move on to the next line.
line = stream_reader.ReadLine()
Loop
End Sub
End Class