473,320 Members | 1,846 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,320 software developers and data experts.

finding out "Process ID" via cmd Console

I have a cmd file (batch file) which starts an exe after setting
parameters. I need to find out the Process ID of the exe via a
command. The problem is that my program, written in C# only knows the
PID of the cmd file. I don't want to use a method like
GetAllProcesses(). If I want to kill the processes (both the cmd and
the exe) I have to kill the exe. Otherwise the exe process is still
alive. The "taskkill" command is also not helpful because the program
itself can be started for several times. That's why the name of the
process doesn't really help to kill it.

Thanks for help.

Jun 11 '07 #1
1 8299
try here: http://forums.microsoft.com/MSDN/Sho...62676&SiteID=1

Christoph je napisao/la:
I have a cmd file (batch file) which starts an exe after setting
parameters. I need to find out the Process ID of the exe via a
command. The problem is that my program, written in C# only knows the
PID of the cmd file. I don't want to use a method like
GetAllProcesses(). If I want to kill the processes (both the cmd and
the exe) I have to kill the exe. Otherwise the exe process is still
alive. The "taskkill" command is also not helpful because the program
itself can be started for several times. That's why the name of the
process doesn't really help to kill it.
Jun 11 '07 #2

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

Similar topics

3
by: Greg Bryant | last post by:
I'm doing some work for a company that has an auction site running in coldfusion. They're not real happy with it, and it needs a major overhaul, so I'm looking at redoing it, and while I'm at it,...
4
by: Jochen Demuth | last post by:
Hi, I am trying to install ZWiki on Zope 2.5.1 / Debian 2.4.20-bf2.4-xfs. First I copied the contents of the ZWiki-0.32.0.tgz to the Products-directory under SOFTWARE_HOME: This is what it...
10
by: Generic Usenet Account | last post by:
I have worked out a very simple method for tracking the "memory growth" of a process at run time. It involves a header file and a shell script. Here's the header file: ////////// Header File...
3
by: kj | last post by:
This problem is driving me nuts. The code at the end of this post below works fine with IE, but fails with Mozilla. You can see it in action at http://tinyurl.com/2jvo3 With Mozilla 1.4 and...
13
by: baumann.Pan | last post by:
when define char *p = " can not modify"; p ='b' ;is not allowed, but if you declare p as char p = "can modify"; p = 'b'; is ok? why?
1
by: Omer kamal | last post by:
When in database(.mdb) the primary key have fields size type "Replication ID" it creates Guid. I tried to create string of Guid and insert it but did it not work. Control.databindings.add(),...
2
by: jain_tj | last post by:
Could anyone please help me with the following problem My xml file is ============== <fig id="F0000001"> <caption>Caption text</caption> <image id="I0000001" image.class="halftone"...
5
by: Matt | last post by:
Ok so I'm trying to run a simple dos command shell through a VB.NET 2005 program. The oddest thing is happening given the following piece of code: ...
1
by: drnicwilliams | last post by:
The Prototype library gives us the $() operation for converting a DOM element id into the DOM element: $('element-id'). It also appends a bunch of functions to the resulting object. Sometimes...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.