If the application is a Win32 graphical application, it will simply start and the command prompt will not wait for exit.
If the application is a console application, it will be launched on the command line, and you will need to wait for it to complete in order to return the command line.
EDIT:
OK You seem to need a technical explanation. If you want to emulate the same function in your application, you can check the IMAGE_OPTIONAL_HEADER EXE files here .
Inside IMAGE_OPTIONAL_HEADER there is:
WORD Subsystem;
If SubSystem == 0x02 this means that this is a GUI application.
If SubSystem == 0x03 This means that this is a command line application.
EDIT 2:
If you want to see it in action:
Download http://www.ntcore.com/exsuite.php
Copy calc.exe or notepad.exe to the desktop
Open copied calc.exe file in CFF Explorer
Go to Nt Headers -> Additional Headers
Change SubSystem from 0x002 to 0x003
Save
Now run the new modified calculator, and you will see that it is expected to stop on the command line.
72DFBF5B A0DF5BE9 Mar 08 '14 at 19:12 2014-03-08 19:12
source share