- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm running Compaq Visual Fortran on Windows. Can you tell me how I can run a Dos Program (an exe program) programmatically? Thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot Steve.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page