1.

Solve : DOS Program/XP/Network Issue?

Answer»

At my workplace, we use a dos program called CPS Run-Time System. It currently runs on a desktop RUNNING Win98 setup as a server. All other computers on the network have it added as a network drive. To access the program, users execute a "c.bat" file with the following code:

Code: [Select]CD\
f:
cd cado
CPL -C1 S
cd\
c:
exit
F: is the server of course. And then it changes to the cado (the program) folder, and executes "CPL -C1 -S". Typically, after that line, the program opens up IMMEDIATELY.

We are attempting to replace an older computer that has XP with a newer computer running XP (Vista/7 dont run this natively). However, we are getting an error after the "CPL -C1 -S" line as follows:
Code: [Select][command] is not recognized as an internal or external command, operable program, or batch file
I have never seen this error before. And I don't understand it since all computers handle this fine. Help!First of all, your batch program is doing more than it needs to. You could change the whole thing to
Code: [Select]F:\cado\CPL -C1 S
and it do the same thing. But that's just preference, doesn't change the functionality. (If you didn't write it, don't change it)


Can you run it manually?
In your command prompt, go to F:\cado\ and type in "CPL -C1 S" and see what happens. If it doesn't run from there (and it still runs from other computers), there may be a network problem. Verify that the mapped folder is indeed mapped and try browsing to it in Windows Explorer (aka My Computer).is F:\cado\CPL another batch file or a .exe? if it's a batch file, it may have to be edited to not reference command.com directly. If it's a .exe, there's not as much you can do. The fact that it runs on XP (which should not have command.com) at all suggests that command.com was manually COPIED to them at some point (or left behind in an upgrade from the 9x family).Quote from: michaewlewis on SEPTEMBER 11, 2012, 01:57:53 PM

First of all, your batch program is doing more than it needs to. You could change the whole thing to
Code: [Select]F:\cado\CPL -C1 S
and it do the same thing.

No, it won't. It will not be in the same directory and it could matter.

Quote
The fact that it runs on XP (which should not have command.com)

XP does have command.com for legacy applications. It is a stub, and mostly hands off the commands to cmd.exe though.


@the OP:

Try this modification of your code to diagnose the issue. When the dir command lists the files starting with c, ensure that the CPL program is there.

Code: [Select]f:
cd \cado
dir c* /b /a-d /p
pause
CPL -C1 S
pause
exit

Note that the first CD\ command in your batch file is misplaced and it would come after the F: drive change, but instead you can explicitly change the working directory with the 'cd \cado'.

With it in the current position: if the working directory on the f: drive was changed then the 'cd cado' could fail and you would get the error you described, along with another error.


If it still fails then do a screen copy and paste it into a reply.Quote from: foxidrive on September 11, 2012, 07:21:04 PM
XP does have command.com for legacy applications. It is a stub, and mostly hands off the commands to cmd.exe though.

I READ into this and I guess it does. I never realized command.com (in any form at all) was kept past the 9x branch, which ended with WinME. I always assumed that it had been dropped in windows NT when they introduced cmd.exe. My apologies Alright so I managed to fix the issue on the system I was working on. All I did was change the PATH in Environmental Variables from:

%SystemRoot%;%SystemRoot%\system32;%SystemRoot%\system32\Wbem

to

C:\Windows\System32\;%SystemRoot%;%SystemRoot%\System32\Wbem

That solution worked great. HOWEVER... I'm working on a second machine now and this fix isn't working. In fact, when I use the same fix as above (and even with the original PATH value in place, I still get the issue). Even when I type %systemroot%\system32 into a DOS prompt, it gives me the same error.

So finally I added F:\cado;F:\CADO\CPS to the PATH as well. That finally gives me a new error, but one I've never seen (and keep in mind, no other computer on the network has needed this): error opening/accessing cps_data.exe

So with this machine, I'm really lost. Basically, same problem, cannot duplicate fix. Any thoughts?


EDIT:
also, theres a legacy AUTOEXEC bat file that goes on every system we try to run this program from. although XP doesnt use AUTOEXEC bat files on start up anymore. ill show it just for completeness:

REM [Cado Accounting App]
PATH=%PATH%;F:\cado;F:\CADO\CPS
SET CPSNODE=AB017
SET CPSSYS=F:\CADOI posted a reply and diagnostic steps.

Here it is again. Copy and paste the screen output if it still fails.

Code: [Select]f:
cd \cado
dir c* /b /a-d /p
pause
CPL -C1 S
pause
exit


Discussion

No Comment Found