|
-
May 16th, 2005, 04:50 AM
#1
Thread Starter
Addicted Member
Process Output
VB Code:
Dim P As Process = New Process
P.StartInfo.FileName = "CMD.EXE"
P.StartInfo.Arguments = "/c NETSTAT -N"
P.StartInfo.CreateNoWindow = true
P.StartInfo.WindowStyle = ProcessWindowStyle.hidden
P.StartInfo.RedirectStandardError = True
P.Start()
TextBox1.Text = P.StandardOutput.ReadToEnd.ToString
I did try system.diagnostic.process.start(p), but that did not work.
I want the Output(ipaddress) to be in a Textbox, not written to a Stream, but as there are no properties like messageoutput, what do I do?
Curiosity SKILLED the cat
Google Talk from your Mobile phone
Chat from your mobile or get an emulator like J2ME Wireless Toolkit 2.2
-
May 17th, 2005, 09:08 AM
#2
Thread Starter
Addicted Member
Re: Process Output
Anyone got a Idea, or the Solution?
Curiosity SKILLED the cat
Google Talk from your Mobile phone
Chat from your mobile or get an emulator like J2ME Wireless Toolkit 2.2
-
May 18th, 2005, 11:04 AM
#3
Re: Process Output
In the arguments you can pipe out the results to a textfile. Then read it back in to your program's textbox.
VB Code:
P.StartInfo.Arguments = "/c NETSTAT -N > C:\Results.txt"
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 19th, 2005, 08:51 AM
#4
Thread Starter
Addicted Member
Re: Process Output
I Do use the Above, and notes it took up 33K in memory, so thats what I wanted a Direct way. The code I posted was with RedirectStandardError. What about RedirectStandardOutput, it still did not work with the method I put above. But maybe one of ya'll know.....
Curiosity SKILLED the cat
Google Talk from your Mobile phone
Chat from your mobile or get an emulator like J2ME Wireless Toolkit 2.2
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
|