I want my listbox to show just like in cmd.
C:\adb>fastboot getvar all
(bootloader) kernel: lk
(bootloader) product: htc_a32eul
(bootloader) version: 1.0
(bootloader) imei: 358720060483378
(bootloader) version-main: 1.23.531.3
(bootloader) boot-mode: download
(bootloader) version-baseband: 01.01_U113251151_47.00.51016G
(bootloader) version-bootloader: 1.0.0.0000
(bootloader) mid: 0PM911000
(bootloader) cid: T-MOB010
all:
finished. total time: 0.164s
I have this code for vb but doesn't display anything.
My_Process_Info.FileName = "cmd.exe" ' Process filename
My_Process_Info.Arguments = Arguments ' Process arguments
My_Process_Info.WorkingDirectory = "C:\adb" 'this directory can be different in your case.
My_Process_Info.CreateNoWindow = True ' Show or hide the process Window
My_Process_Info.UseShellExecute = False ' Don't use system shell to execute the process
My_Process_Info.RedirectStandardOutput = True ' Redirect (1) Output
My_Process_Info.RedirectStandardError = True ' Redirect non (1) Output
My_Process.EnableRaisingEvents = True ' Raise events
My_Process.StartInfo = My_Process_Info
My_Process.Start() ' Run the process NOW
Dim Process_ErrorOutput As String = My_Process.StandardOutput.ReadToEnd() ' Stores the Error Output (If any)
Dim Process_StandardOutput As String = My_Process.StandardOutput.ReadToEnd() ' Stores the Standard Output (If any)
' Return output by priority
If Process_ErrorOutput IsNot Nothing Then Return Process_ErrorOutput ' Returns the ErrorOutput (if any)
If Process_StandardOutput IsNot Nothing Then Return Process_StandardOutput ' Returns the StandardOutput (if any)
Catch ex As Exception
Return ex.Message
End Try
Return "OK"
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'Usage:
'Get the list of connected devices.
listbox1.items.add(adb("/c fastboot devices"))
listbox1.items.add(adb("/c fastboot getvar all"))
C:\adb>fastboot getvar all
(bootloader) kernel: lk
(bootloader) product: htc_a32eul
(bootloader) version: 1.0
(bootloader) imei: 358720060483378
(bootloader) version-main: 1.23.531.3
(bootloader) boot-mode: download
(bootloader) version-baseband: 01.01_U113251151_47.00.51016G
(bootloader) version-bootloader: 1.0.0.0000
(bootloader) mid: 0PM911000
(bootloader) cid: T-MOB010
all:
finished. total time: 0.164s
I have this code for vb but doesn't display anything.
My_Process_Info.FileName = "cmd.exe" ' Process filename
My_Process_Info.Arguments = Arguments ' Process arguments
My_Process_Info.WorkingDirectory = "C:\adb" 'this directory can be different in your case.
My_Process_Info.CreateNoWindow = True ' Show or hide the process Window
My_Process_Info.UseShellExecute = False ' Don't use system shell to execute the process
My_Process_Info.RedirectStandardOutput = True ' Redirect (1) Output
My_Process_Info.RedirectStandardError = True ' Redirect non (1) Output
My_Process.EnableRaisingEvents = True ' Raise events
My_Process.StartInfo = My_Process_Info
My_Process.Start() ' Run the process NOW
Dim Process_ErrorOutput As String = My_Process.StandardOutput.ReadToEnd() ' Stores the Error Output (If any)
Dim Process_StandardOutput As String = My_Process.StandardOutput.ReadToEnd() ' Stores the Standard Output (If any)
' Return output by priority
If Process_ErrorOutput IsNot Nothing Then Return Process_ErrorOutput ' Returns the ErrorOutput (if any)
If Process_StandardOutput IsNot Nothing Then Return Process_StandardOutput ' Returns the StandardOutput (if any)
Catch ex As Exception
Return ex.Message
End Try
Return "OK"
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'Usage:
'Get the list of connected devices.
listbox1.items.add(adb("/c fastboot devices"))
listbox1.items.add(adb("/c fastboot getvar all"))