Click here to Skip to main content
16,021,911 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

Is there a way to change the working directory of a new process
that is created from another process with CreateProcess() function?

Thanks!

What I have tried:

Searching with Google
reading createprocess notes
Posted

1 solution

There's an optional lpCurrentDirectory parameter. You should be setting that to set a working directory. The documentation[^] provides more details about the parameters available to you in CreateProcess.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900