473,394 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Launch External Program

Hi,

How will you know if an external program has launched successfully? I'm
trying to use System.Diagnostics.Process class.

I know that you can check if the process has exited but can you tell if it
has launched it successfully?

Thanks,
Glenn
Aug 9 '06 #1
3 1078
Well.. usually, if the process hasn't exited, then it's running! I guess in
your case, that's not the case :D

There's Process.Responding, which will tell you is the process is "active"
in the eyes of the OS.
I think that's all that could be useful.
Which process are you needing to know about??
__________________________________________________
The Grim Reaper
"Glenn Palomar" <gl***********@autodesk.comwrote in message
news:OU**************@TK2MSFTNGP05.phx.gbl...
Hi,

How will you know if an external program has launched successfully? I'm
trying to use System.Diagnostics.Process class.

I know that you can check if the process has exited but can you tell if it
has launched it successfully?

Thanks,
Glenn


Aug 9 '06 #2
I wanted my application to block until it has loaded the external
application (Inventor).

I guess I can put it in a while loop and wait until I get something when I
call Marshal.GetActiveObject.

"The Grim Reaper" <gr*********@REMOVEbtopenworld.comwrote in message
news:hI********************@bt.com...
Well.. usually, if the process hasn't exited, then it's running! I guess
in your case, that's not the case :D

There's Process.Responding, which will tell you is the process is "active"
in the eyes of the OS.
I think that's all that could be useful.
Which process are you needing to know about??
__________________________________________________
The Grim Reaper
"Glenn Palomar" <gl***********@autodesk.comwrote in message
news:OU**************@TK2MSFTNGP05.phx.gbl...
>Hi,

How will you know if an external program has launched successfully? I'm
trying to use System.Diagnostics.Process class.

I know that you can check if the process has exited but can you tell if
it has launched it successfully?

Thanks,
Glenn



Aug 9 '06 #3
"Glenn Palomar" <gl***********@autodesk.comschrieb:
How will you know if an external program has launched successfully? I'm
trying to use System.Diagnostics.Process class.

I know that you can check if the process has exited but can you tell if it
has launched it successfully?
I assume an exception is thrown if the file cannot be found, for example.
In addition you may waht to check the exit code returned by the started
application:

\\\
Dim p As Process = Process.Start(...)
p.WaitForExit()
MsgBox(p.ExitCode)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Aug 9 '06 #4

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

Similar topics

1
by: Juan Romero | last post by:
Hey guys, I need to launch an external application, but I need to launch it with some command line arguments. Now the thing is that I need to launch it as a process. For example: Dim p As New...
5
by: cooltoriz | last post by:
Hello there, I am not asking how to impersonate a process within C# windows application. I already know that, in C# v2.0, you can easily achieve it using ProcessStartInfo. You can run a process...
3
by: LordHog | last post by:
Hello, How would I go about finding the default handler, let's say a text file (*.txt), then launch the default handler with the file as an argument? I had found how to launch an external...
0
amitpatel66
by: amitpatel66 | last post by:
There is always a requirement that in Oracle Applications, the Concurrent Program need to be execute programatically based on certain conditions/validations: Concurrent programs can be executed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...

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.