Below is a sample of a class I am trying to get to work. I would like to start a system process(ipconfig) and return the results.Imports System
Public Class Machine
Dim myProcess As New System.Diagnostics.Process()
Function IPConfig() As String
Dim myConfig As String
myProcess.StartInfo.RedirectStandardOutput = True
myProcess.StartInfo.UseShellExecute = True
myProcess.StartInfo.FileName = "ipconfig.exe"
myProcess.StartInfo.Arguments = "/all"
myConfig = myProcess.StandardOutput.ReadToEnd
Return myConfig
End Function
End ClassHowever, I keep getting this error:
<color="darkred">System.InvalidOperationException: StandardOut has not been redirected. at System.Diagnostics.Process.get_StandardOutput() at Machine.MacAddress(String ipAddress)</color>
Any ideas

System Process and returning a value to a form
Lordnikon981
Ramesh Jha
Fahad Mukhtar