find the location of the cmd.exe file
<p>I have built a c++ program that depends on "cmd.exe" to execute some of the tasks.
For now I and for test purposes the path to that file is "c:\windows\system32\cmd.exe". 
My question is there any c++ API that returns the path of that file knowing that my program must work on win32 and on win64.</p>