[comp.windows.ms] File indirection

jls@hsv3.UUCP (James Seidman) (09/01/90)

In article <1990Aug31.184944.22989@athena.mit.edu> acook@athena.mit.edu (Andrew R Cook) writes:
>Has anyone tried to run a dos program under windows and supply any input for
>it by using indirection ?  Ie:
>	progm < cmds
>where cmds is a file that contains the resonses to inputs asked for by progm ?
>I have tried doing it by using the run command, and by putting stuff in a PIF
>file, but neither technique seems to work.  Any Windows hackers know a way to
>do this?  Is it even possible ?

Redirection is handled by command.com, which is not normally called from
the run menu.  You might be able to do something like this (which I haven't
tried, but it sounds good):

	command /c progm < cmds

which will force windows to load command.com which can then handle the
redirection for you.  (The /c means that command.com should go away as
soon as progm is done, and not stick around waiting for another command.)
Hope this helps.

-- 
Jim Seidman (Drax), the accidental engineer.
UUCP: ames!vsi1!headland!jls
ARPA: jls%headland.UUCP@ames.nasa.arc.gov