Running .EXE files from program 
Author Message
 Running .EXE files from program

I am using Borland Turbo Pascal for Windows v1.5

I am trying to make a program that allows the user to run an external
.EXE programs from a menu.  I have heard of the WinExec unit, but do not
have it.  Can it be downloaded, or is there another way to program this?

Thank you in advance.



Wed, 18 Jun 1902 08:00:00 GMT  
 Running .EXE files from program


Quote:
>I am using Borland Turbo Pascal for Windows v1.5
>I am trying to make a program that allows the user to run an external
>.EXE programs from a menu.  I have heard of the WinExec unit, but do not
>have it.

WinExec is not a unit. It's a Windows built-in routine:

function WinExec(CmdLine: PChar; CmdShow: Word): Word;

CmdLine is the command to execute
CmdShow is the initial window state
The function returns <32 if an error occurs

program Exec_sample;

uses WinTypes, WinProcs;

begin
  WinExec('soundrec.exe',SW_SHOWNORMAL);
end.

BandiT



Wed, 18 Jun 1902 08:00:00 GMT  
 Running .EXE files from program

This worked wonderfully.  Thanks.

Quote:

> WinExec is not a unit. It's a Windows built-in routine:

> function WinExec(CmdLine: PChar; CmdShow: Word): Word;

> CmdLine is the command to execute
> CmdShow is the initial window state
> The function returns <32 if an error occurs

> program Exec_sample;

> uses WinTypes, WinProcs;

> begin
>   WinExec('soundrec.exe',SW_SHOWNORMAL);
> end.

> BandiT



Wed, 18 Jun 1902 08:00:00 GMT  
 Running .EXE files from program

John,
Using my newreader, I like to have the reponse on top. That way I
don't have to scroll down.

[snip]

Quote:
>begin
>  WinExec('soundrec.exe',SW_SHOWNORMAL);

Dors this SW stand for standard windows?

Quote:
>end.
>BandiT

Thanks.


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Running External EXE files from a program [EXEC]

2. Running a batch or EXE file from a TP program

3. How run a program.exe at the end of a pascal program

4. running windows exe programs from Turbo Pascal

5. Program works in IDE, but not when running the EXE

6. How can a .exe file runs in DOS has windows?(Made in Turbo Pascal)

7. How to run exe - Files out of my Application

8. running win95 exe file from pascal

9. How do I run other .EXE files from my pascal progg

10. How do I run other .EXE files from my pascal progg

11. Relative speed of compiled exe files in BP 7 running under DOS, and in Delphi

12. Linking an .EXE file in my program

 

 
Powered by phpBB® Forum Software