Help with a process?

So, I completely understand processes and stuff, but I would like to know how to run a program I made from a process, like this:
1
2
3
4
5
PROCESS_INFORMATION pi;
STARTUPINFO si = { sizeof(si) };
wchar_t commandLine[] = "myOtherProgramThatImadeInThisIDE.exe";

CreateProcess(NULL, commandLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);


Anyway, just a simple process opening up a separate console application I made. How would I do this? I know where the file is, but would I have to maybe make a shortcut, and then make the commandLine[] that?
To make the system automatically follow shortcuts, use ShellExecute instead of CreateProcess.
Thank you, how would I use ShellExecute? I have heard of it, but I am not very fond of it. Can you give an example please?
Topic archived. No new replies allowed.