473,625 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The problem of using Process Class...Help

Process p = new Process();
p.StartInfo.Fil eName = "a.exe";
//...........

when it executes, it may be create segment error, and the
error will be displyed on the screen.

how can I make it just exit , rather than disply

and, how can i get the exitCode...

by the way, i write the code in Asp.net.....

thank you
Nov 15 '05 #1
5 3914
Hello Stanley,

You could just wrap the Process.Start() in a try...catch block and ingore
the error. As for the exit code, there is an ExitCode property associated
with the Process class. So, you could call p.ExitCode and get the exit
code.

HTH,

Bill P.

On Fri, 1 Aug 2003 07:01:26 -0700, Stanley <us***@yeah.net > wrote:
Process p = new Process();
p.StartInfo.Fil eName = "a.exe";
//...........

when it executes, it may be create segment error, and the error will be
displyed on the screen.

how can I make it just exit , rather than disply

and, how can i get the exitCode...

by the way, i write the code in Asp.net.....

thank you


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #2
Hello Stanley,

You could just wrap the Process.Start() in a try...catch block and ingore
the error. As for the exit code, there is an ExitCode property associated
with the Process class. So, you could call p.ExitCode and get the exit
code.

HTH,

Bill P.

On Fri, 1 Aug 2003 07:01:26 -0700, Stanley <us***@yeah.net > wrote:
Process p = new Process();
p.StartInfo.Fil eName = "a.exe";
//...........

when it executes, it may be create segment error, and the error will be
displyed on the screen.

how can I make it just exit , rather than disply

and, how can i get the exitCode...

by the way, i write the code in Asp.net.....

thank you


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #3
Dear Bill:
the error message is disply by Windows2000, can I config
the system, so it does not disply the error....
-----Original Message-----
Hmmm.. is it "a.exe" that is displaying the error message? If that is thecase, then, unless the developers put in a switch or command line arguementto supress the error window, you are going to have to deal with it (Youmight be able to trap the window handle that gets created when the messageis displayed and use a WM_* message to click the OK button, or somethinglike that).


Nov 15 '05 #4
Dear Bill:
the error message is disply by Windows2000, can I config
the system, so it does not disply the error....
-----Original Message-----
Hmmm.. is it "a.exe" that is displaying the error message? If that is thecase, then, unless the developers put in a switch or command line arguementto supress the error window, you are going to have to deal with it (Youmight be able to trap the window handle that gets created when the messageis displayed and use a WM_* message to click the OK button, or somethinglike that).


Nov 15 '05 #5
I don't know. Could be a setting, but *I* personally don't know of one that
allows suppression of OS messages. You might want to talk to the developer
and see if there is a switch that allows you to disable error messages.

HTH<

Bill P

On Fri, 1 Aug 2003 18:06:13 -0700, Stanley <us***@yeah.net > wrote:
Dear Bill:
the error message is disply by Windows2000, can I config the system, so
it does not disply the error....
-----Original Message-----
Hmmm.. is it "a.exe" that is displaying the error

message? If that is the
case, then, unless the developers put in a switch or

command line arguement
to supress the error window, you are going to have to

deal with it (You
might be able to trap the window handle that gets created

when the message
is displayed and use a WM_* message to click the OK

button, or something
like that).



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5214
by: Reed | last post by:
Can someone stear me in the right direction to convert a binary tree from a Linked List to a Dynamic Array... Dynamic arrays aren't something im strong with. //********bintree.h******** #ifndef BINTREE_H #define BINTREE_H #include <cstdlib> // Provides NULL and size_t
121
10011
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
11
6583
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
7
29333
by: Vincent Nguyen | last post by:
Hi, Does anyone know how call Win32 native API GetTokenInformation() by using C#? Any sample code would be helpful. Thanks! Vincent
0
1718
by: Tony Wong | last post by:
I am trying to implement the Singleton Pattern for a assembly (class) which control a common resource on my computer. I need the Singleton behavior within a single process which contain multiple AppDomains. I use a static member to count class instance like this, public __gc class foo: public IDisposable { public:
12
2364
by: Raymond Lewallen | last post by:
How to wait for a process to stop completion is my goal. Obviously, the looping while waiting for the HasExited property is not a solution.. but thats the best I can come up off the top of my head. Natuarally it will not work. I expect it to use up all resources looping, which will not allow the process to complete. The process takes about 60 seconds, because the .bat file it is calling is rebuilding mulitple .NET solutions and projects...
12
2196
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control server. It "serves" back the required control (either WebControl or UserControl) based on the contents of an xml file. The code in the webform places each control in a TableCell. My problem is that the control server works as far as returning the...
3
1757
by: Vicky_r | last post by:
hi.. I am using Process class to run a .bat file. The .bat file contains the code to run the Session StateServer. First I have written a command in a text file then I convert it to bat and with the help of Process I run the bat file. Now when I use this line "cd C:\WINNT\Microsoft.NET\Framework\v2.0.50727 net start aspnet_state" its
1
1844
by: Wang E | last post by:
I've been working on an online judge(for ACM/ICPC) using C#.Programmes submitted by users can now be compiled,and it's the problem to judge.I use the Process class in C#,and my thread is as follows:start a process using this class with parameters such as input file,output file,etc,and when the programme is running,i get its running information such as running time,used memory,etc.I code as follows: Process p = new Process();...
2
4391
by: lewisms | last post by:
Hello all, I am quite new to c++/. Net so please don't shoot me down for being a newbie. Any way I am trying to make a simple multithreading program that is just to learn the ideas behind it (before I incorporate them in another program). I just can’t seem to get a non-static call to work in my thread that has access to the Form1 variables and controls I need. I can call a non-static function using another class but then I can seem to get in...
0
8688
Oralloy
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...
0
8635
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8352
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8494
tracyyun
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...
0
7178
agi2029
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...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2614
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
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.