Solved

CreateProcess w/ DOS

Posted on 2002-03-15
1
277 Views
Last Modified: 2008-02-20
This works fine:
CreateProcess(NULL,"test.bat",NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,&StartInfo,&pInfo);

However, if I replace "test.bat" with "start /b /wait test.bat", nothing happens..
why and how?
Thanks.
0
Comment
Question by:j4months
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 6867996
>>However, if I replace "test.bat" with "start /b /wait test.bat", nothing happens..

"start" is not a standalone executable, it's a shell builtin command. However,

cmd.exe /c start /b /wait test.bat

or

command.com /c start /b /wait test.bat

should do it...


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now