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",w indowstate.hidd en[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! 3 1538
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",w indowstate.hidd en[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_lunch meat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
* _IS_ - <g0******@campu s.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",w indowstate.hidd en[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/>
Thank you v helpful.
1§ 1§
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Stephen Miller |
last post by:
On my development machine (where the group 'Everyone' has full access
to every directory), the following code successfully shells to a
console application:
Dim objShell As System.Diagnostics.Process = New
System.Diagnostics.Process()
With objShell
.StartInfo.FileName = "C:\Project\MyApp\MyApp.exe"
.StartInfo.Arguments = " 123"
.StartInfo.WorkingDirectory = "C:\Project\MyApp\"
|
by: Tim Reynolds |
last post by:
Our .Net application calls a web method of aplpication 2 that resides on
their Apache server. When I as a developer C#, Studios 2003, make the call to
their web method from my desktop, I receive no exceptions - completes fine.
Their web service url was added as a web reference to our project with no
problem. The following was generated as part of the proxy class:
/// <remarks/>
public DueDateAvailabilityResponse...
|
by: djc |
last post by:
I'm wondering what options are available, if any, for being able to run 'any
command line command' from a .net compiled program. I would want the output
that would normally go to the command line for the command to be available
to my program.
I know from even very old VB that you can 'shell' out and run programs, one
of which could be for example, cmd.exe with specific command but I don't
know that you could get the actual command...
|
by: Neel |
last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to
check whether that host is connected or not.
if (0 == system("ping -w 2 192.168.0.2))
But, in both cases (connected/disconnected), system call returns 0. Can
someone please show what I am doing wrong? How to check the actual
result of the ping status using C++ on Redhat linux ?
Thanks in advance.
|
by: MirkoGeest |
last post by:
(Webmaster: sorry, I posted this first at the General Software
Engineering category, but I think this goes here)
I'm using Visual Basic with Web Forms on .NET 2003 and I'm experiencing
a very weird problem:
When the user presses a button, the web application starts a shell
process to decompress a *.gz file with gzip.exe. All ok for now, I get
some data and send formatted data to the client browser.
| |
by: djc |
last post by:
I get this *intermittently* on a utility I am working on. I don't know whats
going on but here are a few points about it:
- using VS 2005, running on xp sp2
- program uses multiple threadpool threads
- only happens when built with the 'release' configuration (no debug flag,
compiler optimizations in effect) - no problems in debug config
here is the error:
Unhandled Exception: System.AccessViolationException: Attempted to read or
write...
|
by: Charlie of Bolton |
last post by:
Hello everyone,
I want to start a ping on my IP number one, but if this first ip is timing out, I want my script to start automatiquely the check 3 other IP simultanously for comparaison.
Of course I want the result of the packet lost % to be shown for each of my IPs and that timed out time. What will be your best guest to built such a tool. I`m using PHP 4.x and MySql 4.0 and Windows XP.
What do you suggest me. »Thanks
Here is...
|
by: Phoe6 |
last post by:
Hi all,
Consider this scenario, where in I need to use subprocess to execute a
command like 'ping 127.0.0.1' which will have a continuous non-
terminating output in Linux.
# code
# This hangs at this point.
How should I handle these kind of commands (ping 127.0.0.1) with
|
by: jain236 |
last post by:
Hi all
i have a cgi which has ping and stop button when i click it sends system ('ping 126.56.36.80 -t') which continously get the ping status of the ip until we send CTRL+c , but when i click stop button in need to send CTRL+C command , how can we achive this?or else how can we kill the process running?
thanking you in advance
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |