Solved

CreateProcess w/ DOS

Posted on 2002-03-15
1
273 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

708 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

15 Experts available now in Live!

Get 1:1 Help Now