Witam,
Chcę wywołać program, który znajduje się w pewnym katalogu. Ten folder zawiera spacje.
C:\Users\renegat\Documents\Visual Studio 2008\projects\program\Debug\program.exe
Kiedy próbuję uruchomić proces (inny program exe), zwraca on na standardowym wyjściu
Nazwa 'c:\Users\renegat\Documents\Visual' nie jest rozpoznawana jako polecenie wewnętrzne lub zewnętrzne, program wykonywalny lub plik wsadowy.
tak mniej więcej wywołuje program
program=" /C "+program;
bSuccess = CreateProcess("C:\\Windows\\System32\\cmd.exe",
(LPSTR)program.c_str() , // command line
NULL, // process security attributes
NULL, // primary thread security attributes
TRUE, // handles are inherited
0, // creation flags
NULL, // use parent's environment
NULL, // use parent's current directory
&siStartInfo, // STARTUPINFO pointer
&piProcInfo); // receives PROCESS_INFORMATION