hello
How I can Run exe file in C++.
i have this problem as iam new to this problem iam unable to solve it can someone suggest about it
exe file in C++.
Started by moonrise, May 11 2006 01:27 AM
8 replies to this topic
#1
Posted 11 May 2006 - 01:27 AM
|
|
|
#2
Posted 16 May 2006 - 02:38 AM
Managed C++
System::Diagnostics::Process::Start("file.exe");
System::Diagnostics::Process::Start("file.exe");
#3
Posted 07 October 2007 - 03:36 PM
A much faster way, though potentially problematic, would be:
system("file.exe");
This executes the program through the DOS shell. Any arguments can be passed to the function as if it were on the command line. The only problem is that it interrupts execution of your own program until the called program is finished.
system("file.exe");
This executes the program through the DOS shell. Any arguments can be passed to the function as if it were on the command line. The only problem is that it interrupts execution of your own program until the called program is finished.
#4
Posted 07 October 2007 - 08:47 PM
Dargueta, you shouldn't bump years-old threads. The chances that the author still needs the help is minimal.
Besides that, your code will not be executed in the DOS shell, but in the command prompt.
Besides that, your code will not be executed in the DOS shell, but in the command prompt.
#5
Posted 08 October 2007 - 08:04 AM
Didn't look at the date, sorry. Besides, isn't the command prompt sort of an interface to the shell, and technically the program would then be executed by the shell?
#6
Posted 08 October 2007 - 08:36 AM
I'm not completely sure about this, but I don't think MSDOS is used at all by Windows anymore for larger purposes. The last full-supported MSDOS was shipped with Windows ME, and later versions only includes a subset of it, which is only used if it's really necessary.
#7
Posted 08 October 2007 - 08:39 AM
I've noticed that. Windows 95 comes with DOS 6, and XP comes with 5.0. What a ripoff...
Anyway, I apologize again for my noob mistake.
Anyway, I apologize again for my noob mistake.
#8
Posted 08 October 2007 - 08:43 AM
You don't have to apologize for it, everybody makes mistakes - but at least, we're learning from them. :-)
#9
Posted 08 October 2007 - 11:09 AM
You can start an application through a shell command or the Win32_Process class. Specifically, the Create method which requires an object of Win32_ProcessStartup. This is the entry point that is preferred by Microsoft, but there are probably other ways.
Conerning DOS: Windows 2000 and up kernels do not use MS-DOS. All 16-bit control is handled in NTLDR during the boot process. If an application requires a 16 bit memory space, it runs in a protected memory range, and the calls are thunked back and forth during execution. CMD.exe, the command prompt, and Explorer.exe, the default shell, reference many of the same libraries. Most, if not all, the difference between the two is at the presentation layer.
Conerning DOS: Windows 2000 and up kernels do not use MS-DOS. All 16-bit control is handled in NTLDR during the boot process. If an application requires a 16 bit memory space, it runs in a protected memory range, and the calls are thunked back and forth during execution. CMD.exe, the command prompt, and Explorer.exe, the default shell, reference many of the same libraries. Most, if not all, the difference between the two is at the presentation layer.


Sign In
Create Account


Back to top









