If you use CreateProcess, it only works on .exe’s, apparently. What’s the best way to make this work with other executable file types?
The best we have so far is to prepend cmd /c to such cases. Is that really the correct approach?
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.
Batch files aren’t technically executable files, they are just registered to open with
cmd. As you mention that you need the ability to manipulate I/O handles, your best bet is indeed to useCreateProcesswithcmd /c.