winapi - How to find working directory which works between different computers. - C -
i running 2 processes,process opened process b using following example:
createprocesshandle = createprocess( text("c:\\users\jamie\\documents\\application\\debug\\processa.exe"), text(""), null, null, false, 0, null, null, &startupinfo, &process_information );
as can see process reliant on path given it, problem have if change location of processa.exe (such backup/duplicate) it's tiresome process keep recoding path. want able make run no matter without having recode path manually.
can suggest solution this?
edit: not have access path environment variable
there 2 options.
- use relative path.
- put directory in path environment variable. in case, use lpcommandline, not lpapplicationname.
Comments
Post a Comment