954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Getting info about process status

Hi. I need program wich will start other program (for example notepad.exe) and if notepad.exe will exit my program will start it again. How can i get info about process state and put it into variable to use with if? I'm beginner at C++ so please write all headers witch i need to include and code example with explanation. Thank you.

fire_
Junior Poster in Training
57 posts since Aug 2010
Reputation Points: 10
Solved Threads: 1
 
Hi. I need program wich will start other program (for example notepad.exe) and if notepad.exe will exit my program will start it again. How can i get info about process state and put it into variable to use with if? I'm beginner at C++ so please write all headers witch i need to include and code example with explanation. Thank you.

i don't know how to check if notepad is open...

but to open notepad:

system ("start notepad.exe");

is this..

^Y^ nobody ^Y^
Newbie Poster
15 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

I'm using this:

WinExec("C:\\WINDOWS\\notepad.exe", SW_SHOWNORMAL);

Anyway thanks for answer

fire_
Junior Poster in Training
57 posts since Aug 2010
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: