I have to start a process in a cmd window.
But in cases like shown because of some error cmd window just flashes and I can’t see what happens. It would be the best if cmd window stay opened until some keypress or similar.
Dim q As String = Chr(34)
Dim p As New Process
With p.StartInfo
.FileName = q & whereis7z & "\7z.exe" & q
.Arguments = " e " & q & tempArch & fNameStr & q & " -y"
.WindowStyle = ProcessWindowStyle.Normal
.CreateNoWindow = False
.WorkingDirectory = tempArch
Debug.Print(.FileName & .Arguments)
End With
p.Start()
If p.ExitCode <> 0 Then
MsgBox(p.ExitCode, MsgBoxStyle.Critical)
End If
Is here any way to keep cmd window opened until keypress to see what’s wrong with my ‘StartInfo’ because ‘ExitCode’ is not enough.
Alternatively, you could redirect the standard output of the window in order to capture the program output.
Then just read in what the program has output so you can display it yourself,