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

CreateProcess with exe and file in different directories 1

Status
Not open for further replies.

k2w

Programmer
Dec 17, 2002
34
CA
Hi!

When I use CreateProcess is there a way to have the exe in one directory and the file being executed another? I get an error saying that the file or path does not exist if they are not located in the same directory.

Or

I can start it the way I want if I use Shell, but I need to be able to terminate this process whenever I wish too.
Is there a way to terminate a process started with Shell, without forcing it to be in focus until the user terminates it?

Thanks!
 
You can do that, but you'll have to fully qualify the path the exe is in, or it has to be in the searchpath (in the latter case the modulename must be specified in the lpCommandLind argument, the lpApplicationName does NOT search the path).
Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top