Trying to use Run (!) command in Fox DOS  
Author Message
Ladonnai





PostPosted: Tue May 16 16:11:11 CDT 2006 Top

Exchange Servers >> Trying to use Run (!) command in Fox DOS

Trying to use the run command from a Fox 2.6 to run a batch file. all
that we get is a flash of the DOS window when trying to run a pdf
conversion utility.
The calling program runs an nprint command which has been replaced with
a batch file of the same name. The source code cannot be changed so we
are trying to fool it.

If a pause is placed in the batch file before the call to the pdf
utility it stops correctly.
if a pause is placed after the batch file call to the pdf utility all
you get is a quick flash of a dos window and nothing happens.

Anyone have experience in getting this to work.

Exchange Server13  
 
 
Rolf





PostPosted: Tue May 16 16:11:11 CDT 2006 Top

Exchange Servers >> Trying to use Run (!) command in Fox DOS > Anyone have experience in getting this to work.

I had to create a small EXE file in VFP to run the batch file.

1) FoxPro 2.6 DOS runs the VFP EXE file.
2) The VFP EXE runs your specially prepared batch file.


 
 
Andrew





PostPosted: Wed May 17 04:04:49 CDT 2006 Top

Exchange Servers >> Trying to use Run (!) command in Fox DOS

> Trying to use the run command from a Fox 2.6 to run a batch file. all
> that we get is a flash of the DOS window when trying to run a pdf
> conversion utility.
> The calling program runs an nprint command which has been replaced with
> a batch file of the same name. The source code cannot be changed so we
> are trying to fool it.
>
> If a pause is placed in the batch file before the call to the pdf
> utility it stops correctly.
> if a pause is placed after the batch file call to the pdf utility all
> you get is a quick flash of a dos window and nothing happens.
>
> Anyone have experience in getting this to work.

At a rough guess it's saying something like "bad command or file name" or
some other error and then closing.
In FPW there is a .pif called "foxrun.pif" in the foxprow.exe directory, if
I go to the properties of this then I can remove the checkbox for "Close on
exit" and then the command window stays open when running from the IDE so I
can see the error. I don't know whether you can do this from FPD, I've got a
feeling you won't have a foxrun.pif (why would fox dos have a pif, after
all?)

I assume the batch file is running OK when executed from the command line?

--
HTH
Andrew Howell


 
 
Elliott





PostPosted: Thu Jun 01 02:25:33 CDT 2006 Top

Exchange Servers >> Trying to use Run (!) command in Fox DOS According to my manual for FoxPro (DOS), there is an option which can be
used with the RUN command. It says that FoxPro includes a memory manager
utility, FoxSwap. to make full use of the memory manager, include /0 in
the command line -- example:
RUN /0 mybatchfilename.bat
I hope this helps.
--Elliott



> Trying to use the run command from a Fox 2.6 to run a batch file. all
> that we get is a flash of the DOS window when trying to run a pdf
> conversion utility.
> The calling program runs an nprint command which has been replaced with
> a batch file of the same name. The source code cannot be changed so we
> are trying to fool it.
>
> If a pause is placed in the batch file before the call to the pdf
> utility it stops correctly.
> if a pause is placed after the batch file call to the pdf utility all
> you get is a quick flash of a dos window and nothing happens.
>
> Anyone have experience in getting this to work.
>