|
-
Apr 1st, 2005, 07:47 AM
#1
Thread Starter
Junior Member
Getting a value back from a shell command$
Ok,
Suppose I send a file to another exe using a command$ (from within my program) - how do I get a string in return??
Cheers,
Vbnewbie.
-
Apr 1st, 2005, 07:48 AM
#2
Thread Starter
Junior Member
Re: Getting a value back from a shell command$
Oh, to clarify - the program being called is also made by me in VB.net...
-
Apr 1st, 2005, 09:22 AM
#3
Re: Getting a value back from a shell command$
VB Code:
Dim y As New ProcessStartInfo("ipconfig", "/all")
y.CreateNoWindow = True ' do not show a window
y.RedirectStandardOutput = True ' Needed to get the output
y.UseShellExecute = False
Dim x As Process = Process.Start(y)
x.StartInfo = New ProcessStartInfo("ipconfig", "/all")
Dim output As String = x.StandardOutput.ReadToEnd
MsgBox(output)
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|