I want to launch an exe (windows app) from systray, I guess CreateProcess and shellExecute can do it, what's the difference between them? which one should I choose?
Thanks.
Printable View
I want to launch an exe (windows app) from systray, I guess CreateProcess and shellExecute can do it, what's the difference between them? which one should I choose?
Thanks.
The mian difference is if you want to have your code wait for the executable to finish or not
ShellExecute does not return a process handle - you use that in a call to WaitForSingleObject to keep your code idle while the shelled app works.
ShellExecuteEx and CreateProcess both return a process handle.