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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get the Path of the calling program

Status
Not open for further replies.

vietnam97

Programmer
Sep 18, 2000
48
0
0
I have a driver.exe that calls a process.exe, and both reside in different servers. When process.exe starts, is there a way to determine the path of driver.exe without having driver.exe pass any parameters (e.g. the path name)?

Thanks,
Bao
 
Ummm.....I assume your process.exe is an activeX Exe. Not sure what good the path for driver.exe will do you....yea its run from "c:\blah\driver.exe" but what machine is that on? Also driver.exe doesn't launch process.exe You should read up on how DCOM works as I'm not going into a lengthy description of it.
 
Well, we created the two applications, and they were both standard exe. I made up the name just to drive the point. The actual names are: PlanInstall.exe which acts as a driver program, and TextFileGen.exe which is called by PlanInstall.exe. I just want to know the path of PlanInstall.exe so TextFileGen.exe could do some processing internally. I could have PlanInstall passing the path over and have my child program check for it using command() function, but it would require a change in the parent program and I don't want to do that.

Thanks,
Bao
 
Ah you are out of luck. There are no ties between programs in windows. App A that executes App B does not provide any type of link. If App A wants to sit and wait for B to finish it would have to poll the system. Passing the data is your best option as I see it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top