|
Post by harrya on May 2, 2021 16:57:56 GMT 1
I am trying to run a large BAT file which is called by a large compiled Foxpro 2.6 program. Everything works fine under Windows XP and Windows 10 32 bit.
But I am trying to run the program with Windows 10 64 bit using Vdos. The coding is:
Run Starbat.bat HDIN 5 6
Starbat.bat looks like this:
cls goto %1
:HDIN xcopy %2 %3 exit
When I use echo and pause in the batch file to see what I get, HDIN is received but the goto doesn't go to the HDIN part of the batch file.
Is there a fix for this? I tried downloading 4dos but it is not compatible with Windows 10
|
|
|
Post by Jos on May 2, 2021 17:17:03 GMT 1
I can’t reproduce this, it’s not just XCOPY,EXE missing in vDos?
The maximum size of a batch file in vDos is 16,384 bytes, exceeding that would produce an exception.
4DOS is a replacement of COMMAND.COM to be run in DOS/vDos, not Windows 10. Mind, 4DOS needs some 172KB of memory to run.
Jos
|
|
|
Post by harrya on May 2, 2021 17:26:34 GMT 1
My batch file is too large. I will have to make is smaller. I copies xcopy.exe from System32 folder to the folder which holds my program. Will this work or do I need to use the copy command instead?
|
|
|
Post by harrya on May 2, 2021 17:29:27 GMT 1
I have 16 gigs of memory, should be plenty to run 4dos. However, when I try to run the exe file for 4dos, a message says it is not compatible with this computer, which is running Windows 10 64 bit. Should I try to load the file using vdos?
|
|
|
Post by emendelson on May 2, 2021 17:39:02 GMT 1
As Jos said in an earlier message:
"4DOS is a replacement of COMMAND.COM to be run in DOS/vDos, not Windows 10."
If you try to run it in Windows 10 without vDos, you will get the "not compatible with this computer" message.
|
|
|
Post by Jos on May 2, 2021 18:05:08 GMT 1
Furthermore, if your batch file would be too large, vDos throws a "Out of memory" and exits. XCOPY.EXE from System32 is a Windows program. Although vDos can start such a program, that XCOPY expects Windows instead of DOS paths. So that can lead to unexpected behavior, better to use the DOS counterpart. For instance that of FreeDOS: www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/xcopy.html. Since 4DOS is a DOS program, your 16GB of memory don’t apply. It’s mostly used by SET COMSPEC=<path to 4DOS.COM> in autoexec.txt. But then you should actually need its additions to COMMAND.COM, else it will only consume DOS memory. Jos
|
|
|
Post by harrya on May 2, 2021 23:25:28 GMT 1
I reduced the bat file to 11K and it starts to work. However, I use the RENAME command with an * in the batch file and receive a message "no wildcards allowed". Is there any way around this restriction?
|
|
|
Post by Jos on May 2, 2021 23:39:56 GMT 1
The command processor of vDos is intentionally basic: It is primary meant to run end-user programs. So no support of rarely used command options. You could of course try 4DOS with your intended wildcard RENAME…
Jos
|
|
|
Post by harrya on May 2, 2021 23:55:54 GMT 1
I set up 4dos and when I start vdos I receive the following message: 4dos 8.00 ms-dos 5.0 copyright ---etc
c:\>
4dos appears to be running. Does 4dos handle wild cards in the rename command?
How do I check to insure 4dos is running?
Another issue is that in order to get to my program I need to type exit after the c:\> prompt. Entering exit into the autoexec.txt doesn't solve the problem. It just exits before starting my program.
|
|
|
Post by harrya on May 3, 2021 1:54:26 GMT 1
Joss,
1. I start Vdos with only 4dos\4dos.com in the autoexec.txt file
2. I have the STAR folder (my data folder) in the Vdos folder
3. I start Vdos and get a c:\> prompt
4. I CD to Star
5. I then RENAME TDPS*.* TAPA*.*
6. Then command works perfectly and the files are renamed accordingly.
7. However, if I use this in the autoexec.txt:
4DOS\4DOS.COM
CD STAR
STAR.EXE
EXIT
I get a c:\> prompt, then I type exit, and my then program starts. But when I access the batch file
from the program, the rename command no longer works.
It seems like I am terminating 4dos when I type exit. But there is no other way to get to my program.
|
|
|
Post by harrya on May 3, 2021 1:55:48 GMT 1
Joss,
1. I start Vdos with only 4dos\4dos.com in the autoexec.txt file
2. I have the STAR folder (my data folder) in the Vdos folder
3. I start Vdos and get a c:\> prompt
4. I CD to Star
5. I then RENAME TDPS*.* TAPA*.*
6. Then command works perfectly and the files are renamed accordingly.
7. However, if I use this in the autoexec.txt:
4DOS\4DOS.COM
CD STAR
STAR.EXE
EXIT
I get a c:\> prompt, then I type exit, and my then program starts. But when I access the batch file
from the program, the rename command no longer works.
It seems like I am terminating 4dos when I enter exit. But there is no other way to get to my program.
|
|
|
Post by harrya on May 3, 2021 2:45:25 GMT 1
Jos, I tracked the problem further, and it appears that the foxpro 2.6 run command isn't using 4dos. If I do everything from the command line the rename command works. But if I run the bat file from my compiled foxpro 2.6 program, it uses the command processor with Vdos, not 4Dos. Any ideas on how to fix this? Harry
|
|
|
Post by Jos on May 3, 2021 6:30:14 GMT 1
If you do 4DOS\4DOS.COM in autoexec.txt, 4DOS will start and await commands to execute. Just like starting FoxPro, processing autoexec.txt will be suspended until you exit the program.
FoxPro will query the DOS environment variable COMSPEC to determine what command processor to start with RUN. So as said, you have to include a line SET COMSPEC=<DOS_path_to_4DOS.COM> to autoexec.txt before FoxPro is started.
Jos
|
|
|
Post by harrya on May 5, 2021 1:07:50 GMT 1
Jos, My PCL printer is named BROTHERPCLRO. What is the command I use in the config.txt file to direct output to LPT1 to my PCL printer? I tried LPT1=SEL:"\\LENOVO-A\BROTHERPCLRO" and also LPT1=SEL:"BROTHERPCLRO" but neither worked. I use the copy command to copy a file name to LPT1 which has the PCL commands embedded in the file. Harry
|
|
|
Post by harrya on May 5, 2021 5:15:11 GMT 1
Jos, I found the answer to the question I posed in my last message.
However, I am trying to use the font "Lucinda sans typewriter" which is a fixed width type font. But when I enter the phrase in config.txt "LPT1 = FONT: "LUCINDA SANS TYPEWRITER" the font is not used in my print out, but instead a variable spaced font, which I assume is LUCINDA SANS. Is there a limit on the amount of space allowed for font type? If so is there a workaround so that I can use the fixed width font?
|
|