473,406 Members | 2,208 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,406 software developers and data experts.

How to control a process launched with Process.start(string)

I launch an application using this method:

Process.Start("C:\\Documents and
Settings\\Ramón\\Desktop\\C#___Bluegurads_v3_18_0 3_05\\Bluetime_1\\BlueTime\\Debug\\BlueTime.exe");

but then I do not know how to wait until it is finished.
anybody knows how to do it?

Thanks, Ramón
Nov 17 '05 #1
1 1539
private void DownloadFirmware(object sender)
{
string fnName = "DownloadFirmware";
string FileName = Globals.ApplicationPath + "\\SerDL.exe";
// Look for SerDl
if (File.Exists(FileName) == false)
{
MessageBox.Show(string.Format("File '{0}' was not found", FileName));
return;
}
if (sender == cmdInstallFirmware)
{
try
{
System.Diagnostics.Process SerDL = new System.Diagnostics.Process();
SerDL.StartInfo.FileName = FileName;
SerDL.StartInfo.WorkingDirectory =Globals.ApplicationPath + "\\Firmware";
SerDL.StartInfo.UseShellExecute = false;
SerDL.Start();
SerDL.WaitForExit();
}
catch (Exception f)
{
Log.Error(GetType(), fnName, f);
MessageBox.Show(@"Exception occurred while attempting to run SerDl.exe
"+f.Message, "Error");
}
}
}
Nov 17 '05 #2

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

Similar topics

3
by: Earl Eiland | last post by:
The command string consists of "filename.exe instruction1 instruction2 ...." It works in subprocess, but in process, returns the error "can't find the file instruction1". How do I pass command...
3
by: Hon Seng Phuah | last post by:
Hi all, I am new to perl language and need someone to help me. If I have three sentenses. Too good to be true. It is raining today. They wanted the meeting to be on Thursday.
0
by: Russell | last post by:
i want to do a software for japan. it has a reqirment to control the string lenth. in a textbox. if the maxlength is 2, then the textbox can be input 2 "full-width" characters or 4 "half-width"...
6
by: Udi | last post by:
Hi, I tried looking for it in the documentation but with no luck. What's the equivalent C control strings in C# for the following: "%3d" ? (space padding) "%-3d" ? (left alignment) "%+3d" ?...
9
by: timnels | last post by:
I have an issue where I have a user control that is launched into a floating form. At some point later, I allow the user to "unfloat" the user control by reparenting it on a split container in...
2
by: shapper | last post by:
Hello, I am creating a custom web control where one of its properties is a generic list: <Bindable(True), Category("Format"), DefaultValue(""), Localizable(True)Property Features() As...
2
by: mithrakaran | last post by:
Is any control string avail in C lang for binary data like %d for integer
10
by: loisk | last post by:
Hi If anyone helps me on this problem, I'd greatly appreciate it! I have a field name, updatedName, in my database that is the same as originalName for a user to start. I also have two text...
1
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I have a C# application in which I start another process which produces output to stdout and stderr. In fact, that process is the uSoft VS2005 C/C++ compiler itself! I would like to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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...
0
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,...

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.