What are the main differences between the two? I’m willing to run only another EXE from my (C++) application. Are there any differences when inheriting environments, security features etc?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The main difference between
CreateProcessandShellExecuteis the following:CreateProcessis more oriented on low level andShellExecon the high user lever which see the user in explorer.For example using of
CreateProcessone can use command line which length is more asMAX_PATH. It has 32,768 characters restriction. You can also useCreateProcessto start program (if you have enough permissions) on another windows desktop like on the Logon Screen.Another example. You can use
ShellExecuteto start Control Panel or open any program which existed on the computer for editing of JPG filed for example. So you works withShellExecuteclose to the corresponding actions in the Windows Explorer.