By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 910 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

Shelling... the 'system' command and 'Ping'

P: n/a
I have the problem that shelling in vb.net is not working for me at this
point.

I am trying to make a graphical application to netsend (multiple) PCs on
the network(notwork) and to ping to check if they are online or not.

code like:
shell("ping bob >> ""C:\hello.txt""",windowstate.hidden[or whatever],
false)

does not work... nor does:
shell("ping bob >> C:\hello.txt",windowstate.hidden[or whatever], false)

wheras that is a perfectly acceptable string to feed the command
prompt...

I have a C++ class tht runs the C 'system' command on that string, which
works perfectly, but then i can't supress the console window, which
raises its ugliness in an unacceptable manner.

any help?

1 1

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Fri, 27 Aug 2004 06:24:18 -0700, _IS_ - wrote:
code like:
shell("ping bob >> ""C:\hello.txt""",windowstate.hidden[or whatever],
false)

does not work... nor does:
shell("ping bob >> C:\hello.txt",windowstate.hidden[or whatever], false)

wheras that is a perfectly acceptable string to feed the command
prompt...


Try using the Process.Start method to start ping and then you redirect the
output stream to a file.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #2

P: n/a
* _IS_ - <g0******@campus.ru.ac.za> scripsit:
I have the problem that shelling in vb.net is not working for me at this
point.

I am trying to make a graphical application to netsend (multiple) PCs on
the network(notwork) and to ping to check if they are online or not.

code like:
shell("ping bob >> ""C:\hello.txt""",windowstate.hidden[or whatever],
false)

does not work... nor does:
shell("ping bob >> C:\hello.txt",windowstate.hidden[or whatever], false)

wheras that is a perfectly acceptable string to feed the command
prompt...


<URL:http://dotnet.mvps.org/dotnet/samples/miscsamples/downloads/RedirectConsole.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3

P: n/a
Thank you v helpful.

1 1

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.