It's working when I plugin a hard drive with windows 98, and there is no device driver needed as far as I know, otherwise it will not work on windows 98. The I/O RANGE & IRQ, when you set at the cmos level from com1 -> com3 & com2 -> com4, normally use 3E8->??? for com3 and 2E8->??? for com4. Windows 98 can detect as com3& com4, but to a windows xp still detects com1 & com2. For me, its strange...
For the
"Bad command or file name", you can reproduce by yourself by putting at the last line of your autoexec.nt command such as mode comX:baud,parity,data,stopbit then try to invoke a dos application. You will see at the NTVDM, first line the error message.
To see whats going on when you execute an 16 bit MS dos app,put a REM at command "@echo off"
REM @echo off
REM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.
REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless a
REM different startup file is specified in an application's PIF.
REM Install CD ROM extensions
lh %SystemRoot%\system32\mscdexnt.exe
REM Install network redirector (load before dosx.exe)
lh %SystemRoot%\system32\redir
REM Install DPMI support
lh %SystemRoot%\system32\dosx
REM The following line enables Sound Blaster 2.0 support on NTVDM.
REM The command for setting the BLASTER environment is as follows:
REM SET BLASTER=A220 I5 D1 P330
REM where:
REM A specifies the sound blaster's base I/O port
REM I specifies the interrupt request line
REM D specifies the 8-bit DMA channel
REM P specifies the MPU-401 base I/O port
REM T specifies the type of sound blaster card
REM 1 - Sound Blaster 1.5
REM 2 - Sound Blaster Pro I
REM 3 - Sound Blaster 2.0
REM 4 - Sound Blaster Pro II
REM 6 - SOund Blaster 16/AWE 32/32/64
REM
REM The default value is A220 I5 D1 T3 and P330. If any of the switches is
REM left unspecified, the default value will be used. (NOTE, since all the
REM ports are virtualized, the information provided here does not have to
REM match the real hardware setting.) NTVDM supports Sound Blaster 2.0 only.
REM The T switch must be set to 3, if specified.
SET BLASTER=A220 I5 D1 P330 T3
REM To disable the sound blaster 2.0 support on NTVDM, specify an invalid
REM SB base I/O port address. For example:
REM SET BLASTER=A0
mode com3:9600,n,8,1
mode com4:4800,n,8,1
At our office, I do such test by compiling a small code that display the output to a serial Pole Display with clipper 5.2 like the code below.
mDeposit:=10
mTenderAmt:=100
Set devi to print
set print to com2
@1,1 say "Change:"
@2,1 say Trans(mTenderAmt-mDeposit,'999,999.99')
Set print to
Set devi to scree
Note: Mode command is loaded at the autoexec.bat
The executable of this code works on Windows 98 but not in windows xp.
Im puzzled why I received this "Bad command or file name" when I run the executable of the above code.
Any other idea? I want to nail down this problem...really..
Thanks.
>>>>Hi,
>>>>
>>>>I posted two days ago about this subject and it seems nobody has experience in dealing with this problem.
>>>>
>>>>The problem was loading MS DOS environment such as mode comX in windows XP.
>>>>
I added on the last line of autoexec.nt the code MODE COM4:4800,n,8,1 and launching the legacy application still fails. Basically the application will check if can communicate with the
encryption card, this encryption card uses com port but it doesn't work.
>>>>
>>>>Running an instance of command.com within windows, will give me an error
"Bad command or file name". This means that the mode command on autoexec.nt is not working even though the path is correct. I even go to the extent of debugging this mode.com and I found that the said version will not run in dos mode.
>>>
>>>If you go into the Windows Device Manager, you can set the port's values to what you need, without having to run a MODE command. That way the port should be ready to go each time the computer starts.
>>>
>>>While you're in there, check the port settings. While Windows can assign a COM port to a wide range of addresses, DOS apps typically expect the ports to be in a fixed place. On the Resources page it should be set to 02E8-02EF and IRQ3.
>>>
>>>Of course, all this assumes COM4 is visible to Windows. If it doesn't show in the Device Manager you'll need to check that it's set properly (typically in the PC BIOS), then re-start Windows and let it install the new port for you.
>>>
>>>If you have another serial device on COM2 this is likely to conflict with your card, as it would be trying to share IRQ3.
>>>
>>>Some security devices require a low-level DOS driver to be loaded in the apppropriate AUTOEXEC or CONFIG file.
>>>
>>>Finally, have you tried running your Clipper app from a .BAT/.CMD file with the MODE commands there:
REM Batch file to run Clipper App
>>>MODE COM4 < parameters >
>>>Drive:\Path\MyClipperApp.EXE
>>>MODE COM4 < parameters to set it back to default >
>>
>>
>>Thanks AL,
>>
>>In device manager, I have com1, com2, com3 & com4, but I had disabled com1 & com2. The strange thing is this, when I look at the com3 & com4 settings, its the same as the one I set on the autoexec.nt, its getting its baud setting from from it.
>>
>>I had tried also running a batch file invoking mode com4:4800,n,8,1, then the executable file, but still it doesn't communicate with the encryption device.
>
>Did you check that the resources (address range & IRQ) are as I specified above for COM4?
>Does the encryption device require a device driver that must be loaded in CONFIG.NT?