473,765 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

run application twice using c# code

Hi:
i build a .net application named A.exe. I need run this application
twice using c# code in another application. i try to use
process.start(A .exe) twcie, but it failed. Because the second start will use
the existed process. So only one application run.
I can use mouse to run this application twice, and there are two A.exe
processes in processed pool. So how can i do the same work using code but not
manu-click?
Jul 21 '05 #1
2 3686
Can you show the code you are using to "try to use process.start(A .exe)
twice"?

Chris

"Napo" <Na**@discussio ns.microsoft.co m> wrote in message
news:E2******** *************** ***********@mic rosoft.com...
Hi:
i build a .net application named A.exe. I need run this application
twice using c# code in another application. i try to use
process.start(A .exe) twcie, but it failed. Because the second start will
use
the existed process. So only one application run.
I can use mouse to run this application twice, and there are two A.exe
processes in processed pool. So how can i do the same work using code but
not
manu-click?

Jul 21 '05 #2
private void run()
{
Process proc = new Process();
proc.StartInfo. FileName = @"D:\A.exe";
proc.StartInfo. Arguments = "";
proc.Start();
}

then i call this method twice
run();
run();
"Chris, Master of All Things Insignifican" wrote:
Can you show the code you are using to "try to use process.start(A .exe)
twice"?

Chris

"Napo" <Na**@discussio ns.microsoft.co m> wrote in message
news:E2******** *************** ***********@mic rosoft.com...
Hi:
i build a .net application named A.exe. I need run this application
twice using c# code in another application. i try to use
process.start(A .exe) twcie, but it failed. Because the second start will
use
the existed process. So only one application run.
I can use mouse to run this application twice, and there are two A.exe
processes in processed pool. So how can i do the same work using code but
not
manu-click?


Jul 21 '05 #3

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

Similar topics

9
3975
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it will not set the value of the control and will leave the checked status of the checkbox to false when a user selects a new date. this works fine when using the control on a win2k machine but if we use it on a win XP box and call
6
20087
by: orekin | last post by:
Hi There I have been trying to come to grips with Application.Run(), Application.Exit() and the Message Pump and I would really appreciate some feedback on the following questions .. There are quite a few words in this post but the questions are actually quite similar and should be fairly quick to answer ... (1) What is Happening with the Threads
1
1412
by: Jeff S | last post by:
I'm storing a list of widgets in a database. The list changes infrequently (twice per week at most), and is relatively short (200 items at most, with very little detail per item). A small subset of all possible widgets will be displayed on a page (using VB.NET/code behind). I plan to populate a custom collection/class with a list of all possible widgets. The class will include a method that returns the required subset. Of course the logic...
0
1177
by: Sean Kraft | last post by:
Hello, I am generating a PDF and writing its bytes to the browser using Response.BinaryWrite(). Before I do this I set the response.contenttype = "application/pdf". When I run in debug I see that the onInit event gets fired twice, causing my PDF to be generated 2x, to be sure that the debugger is not causing the problem, I write out a text file in the onInit and run it compiled, 2 events are firing compiled also.
6
1118
by: Amy Snyder | last post by:
I have a classic ASP application and don't plan on converting to .NET. But, I would like to create a web service using the .NET Framework to include in this application. Is this possible? If so, how do I go about doing it? Thanks! *** Sent via Developersdex http://www.developersdex.com ***
2
365
by: Napo | last post by:
Hi: i build a .net application named A.exe. I need run this application twice using c# code in another application. i try to use process.start(A.exe) twcie, but it failed. Because the second start will use the existed process. So only one application run. I can use mouse to run this application twice, and there are two A.exe processes in processed pool. So how can i do the same work using code but not manu-click?
5
2476
by: Doug Handler | last post by:
In C# 2.0, w/ the Program.cs file, i noticed that the Application.Run(new appname()) is run twice. I have in my constructor to do a check for a settings file, and if it isn't found, the application exits. But the app doesn't exit, can someone tell me what i'm doing wrong? here's my code: if (filename == null) Application.Exit();
20
2718
by: Peter Oliphant | last post by:
How does one launch multiple forms in an application? Using Photoshop as an example, this application seems to be composed of many 'disjoint' forms. Yet, they all seem somewhat 'active' in contrast to one of them always being 'modal' (e.g., if you are moving over a picture the 'Info' form will update the (x,y) screen location in realtime even if not the selected form. Also note that this example implies the various forms can communicate...
7
2811
by: tshad | last post by:
I thought I understood how the SaveViewState is working and was trying to use this (as per some code I found) to detect refreshes. It seemed to be working but I found that the SaveViewState was executing twice on load of page and can't figure out why. I was writing out to a text file in the SaveViewState event and it was writing it twice everytime a page was loaded (whether on an initial load of the page or Postback). I took out the...
0
9398
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,...
0
10156
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
9832
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
8831
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...
1
7375
isladogs
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...
0
5275
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
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.