Hello all,
I am trying to read in all the output from netstat.exe into my
program. While I have been successfull in doing so, I have some issues
that I cannot solve. I don't want the black window to show up, I want
it run in the background. The black window doesn't show anything in it
as I've already redirected the output to a stream. In any case, here
is my code:
Process process = new Process();
process.StartInfo.FileName = "netstat.exe";
process.StartInfo.Arguments = "-a -p TCP -b";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
// start the process
process.Start();
I have fooled around with the StartInfo.WindowStyle and set it to
hidden, but it doesn't seem to do anything. I have also tried
Minimized and Maximized and they don't do anything either. Has anybody
figured out a way of doing this? Maybe Process isn't the right class
to use?
Any suggestions would be welcomed.
Thanks 3 2616
Hi Zamil,
Scroll up a little bit in the Intellisense and you'll find the
StartInfo.CreateNoWindow property.
Cheers.
"Zamil" <zm****@hotmail.com>
???????:fe*************************@posting.google .com... Hello all,
I am trying to read in all the output from netstat.exe into my program. While I have been successfull in doing so, I have some issues that I cannot solve. I don't want the black window to show up, I want it run in the background. The black window doesn't show anything in it as I've already redirected the output to a stream. In any case, here is my code:
Process process = new Process(); process.StartInfo.FileName = "netstat.exe"; process.StartInfo.Arguments = "-a -p TCP -b"; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true;
// start the process process.Start(); I have fooled around with the StartInfo.WindowStyle and set it to hidden, but it doesn't seem to do anything. I have also tried Minimized and Maximized and they don't do anything either. Has anybody figured out a way of doing this? Maybe Process isn't the right class to use?
Any suggestions would be welcomed.
Thanks
I tried this as well and it also doesn't seem to do anything. If I
change my app to launch say notepad.exe all of these commands work
properly. I can CreateNoWindow and change the WindowStyle.
Any other suggestions?
Thanks
Zamil
"X-Killer" <X-******@netscape.net> wrote in message news:<ud**************@tk2msftngp13.phx.gbl>... Hi Zamil,
Scroll up a little bit in the Intellisense and you'll find the StartInfo.CreateNoWindow property.
Cheers.
"Zamil" <zm****@hotmail.com> ???????:fe*************************@posting.google .com... Hello all,
I am trying to read in all the output from netstat.exe into my program. While I have been successfull in doing so, I have some issues that I cannot solve. I don't want the black window to show up, I want it run in the background. The black window doesn't show anything in it as I've already redirected the output to a stream. In any case, here is my code:
Process process = new Process(); process.StartInfo.FileName = "netstat.exe"; process.StartInfo.Arguments = "-a -p TCP -b"; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true;
// start the process process.Start(); I have fooled around with the StartInfo.WindowStyle and set it to hidden, but it doesn't seem to do anything. I have also tried Minimized and Maximized and they don't do anything either. Has anybody figured out a way of doing this? Maybe Process isn't the right class to use?
Any suggestions would be welcomed.
Thanks
Just to inform you that I had created the exact winform program and it
simply runs as expected without showing any dos windows.
"Zamil" <zm****@hotmail.com>
:fe**************************@posting.google.com.. . I tried this as well and it also doesn't seem to do anything. If I change my app to launch say notepad.exe all of these commands work properly. I can CreateNoWindow and change the WindowStyle.
Any other suggestions?
Thanks Zamil
"X-Killer" <X-******@netscape.net> wrote in message news:<ud**************@tk2msftngp13.phx.gbl>... Hi Zamil,
Scroll up a little bit in the Intellisense and you'll find the StartInfo.CreateNoWindow property.
Cheers.
"Zamil" <zm****@hotmail.com> ???????:fe*************************@posting.google .com... > Hello all, > > I am trying to read in all the output from netstat.exe into my > program. While I have been successfull in doing so, I have some issues > that I cannot solve. I don't want the black window to show up, I want > it run in the background. The black window doesn't show anything in it > as I've already redirected the output to a stream. In any case, here > is my code: > > Process process = new Process(); > process.StartInfo.FileName = "netstat.exe"; > process.StartInfo.Arguments = "-a -p TCP -b"; > process.StartInfo.UseShellExecute = false; > process.StartInfo.RedirectStandardOutput = true; > > // start the process > process.Start(); > > > > I have fooled around with the StartInfo.WindowStyle and set it to > hidden, but it doesn't seem to do anything. I have also tried > Minimized and Maximized and they don't do anything either. Has anybody > figured out a way of doing this? Maybe Process isn't the right class > to use? > > Any suggestions would be welcomed. > > Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Kim Ipsen |
last post by:
Hi.
I don't know if this possible but how would you do it if
you wanted to send commands til the comman prompt (and
preferrably also receive the output from the command
prompt - though not...
|
by: Stephen Woolhead |
last post by:
Anyone know where I can get a command prompt control? Something like the
command window in visual studion that I can add my own commands?
Thanks
Stephen.
|
by: Mullin Yu |
last post by:
But, I want is that I can have a Main app that will start a new process or
kill one particular or all process. The process will open a console exe.
But, I don't want the user to close the console...
|
by: Primera |
last post by:
I have an application that fixes some common problems that prevent the SMS
Advanced Client from operating correctly. During this application I need to
stop the Windows Management Instrumentation...
|
by: Shooter4Life8 |
last post by:
Hi, I am having trouble figureing out the best way to open a command
prompt then write lines to it in VB.NET. Currently I have this code,
but it execute's too fast I think because
Dim psi As...
| |
by: srcleveland |
last post by:
I am trying to have a windows service stop itself. I am currently
using the following code but I would like to find a way to stop the
service without having to shell out to a command prompt
...
|
by: =?Utf-8?B?S3VlaXNoaW9uZyBUdQ==?= |
last post by:
I have a .NET VC++ program, I want to execute some dos command from the
program, e.g. copy some file, and etc. How do I do that?
|
by: kimiraikkonen |
last post by:
Hi experts,
I just want to ask a simple procedure of my simple form. My form has a
input textbox and a button.
I want this if you can help me:
Application user types a command prompt command...
|
by: bkamrani |
last post by:
Hi,
This is a basic problem, but I want to print help content in a Command
Prompt in WinXP and scrolling back to see the first lines. If I start
a command prompt and run python, and then for...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |