Link to home
Start Free TrialLog in
Avatar of mlgwfis
mlgwfis

asked on

redirection in delphi 3

I NEED TO LAUNCH AN .EXE AND GET THE PARAMETERS FROM A FILE THAT IS NEEDED BY THE
EXE.  I'M TRYING TO USE A DOS COMMAND LIKE
MYPROG.EXE < FILENAME.EXT.   THIS IS CALLED REDIRECTION IN DOS, REDIRECTING THE COMMAND LINE KEYBOARD INPUT INTO A FILE.  I NEED TO KNOW HOW TO DO THIS IN DELPHI 3.
I CAN LAUNCH THE PROGRAM USING WINEXEC,SHELLEXECUTE, AND CREATEPROCESS; BUT I CAN'T PASS THE NEEDED PARAMETERS  FOR THAT .EXE.  
Avatar of vladika
vladika

I think you can pass file name as first parameter.
In the program you can read value of first parameter
and open file with name equal parameter's value.
Then read others parameters from this file.

ASKER CERTIFIED SOLUTION
Avatar of ZifNab
ZifNab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial