Perfect. Damn you, MS.
USe: LPCWSTR path = /*...*/;
And so on. It solve the issue. I think.
what should cmd equal to?
What do you want it to do. I mean you should know what do you want to do whaen you call your function. Or you can wait for someone who have more experience with WinAPI than I.
CreateProcessW is using Unicode. I believe the 'W' stands for wide string. The same thing for LPCWSTR. You appear to be mixing the two since your path variable is an ordinary C-string.
Try putting an 'L' in front of the string literals.