Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

DOS and Windows

jen2003
Beginner
1,535 Views
I'm running Compaq Visual Fortran on Windows. Can you tell me how I can run a Dos Program (an exe program) programmatically? Thanks.
0 Kudos
2 Replies
Steven_L_Intel1
Employee
1,535 Views
If it's really a DOS program, you can't. But then it would probably have a .COM file type rather than .EXE.

I assume that what you have is a Windows console application. There are multiple approaches to running the program - which you use depends on whether or not you want to see a console window, whether you want to wait for it to complete, or have other more advanced requirements.

In increasing order of complexity, the things to use are:

1. RUNQQ or SYSTEMQQ library routine (USE DFLIB)
2. ShellExecute Win32 API routine
3. CreateProcess Win32 API routine

Steve
0 Kudos
jen2003
Beginner
1,535 Views
Thanks a lot Steve.
0 Kudos
Reply