Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find the command line

Status
Not open for further replies.

Serban

Programmer
Sep 25, 2001
36
0
0
RO
Hi!

How can I find the command line used to launch an exe.

Thanks

Mircea
 

3 ways in visual basic right off the top of my head.

1. Built in Shell function.
2. API ShellExecute
3. API ShellExecuteEx

Look in help for an explanation of these.

Good Luck

 
I don't want to launch an exe.
When I detect that "otherprog.exe" process is running I want toli find out the command line used to launch it ("otherprog.exe" arg1,arg2,arg3,...)

I don't launch the otherprog.exe.

I hope this is a better explanation


Mircea
 

Yes it is. I could be wrong, but I do not believe that you can find out what command line parameters were used once the process has been launched. Hopefully someone can prove me wrong.

Good Luck
 

neilkonitzer,

As I understand it Serban wants to have a system watch looking for a particular process to start. Once they detect that process they then want to extract, somehow, the command line parameters that started that process. Remember that this process is not what they started nor is it a program etc. that they created, but some other program started, which reminds me of watchdog(?) a software package that could tell you what called what but I do not know if it intercepts any of the calls. Do a search for in on the web, it still may exists.

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top