Windows XP doesn't recognize "&" in path names for DOS apps? - TechRepublic
Question
June 7, 2011 at 04:01 PM
planetearth

Windows XP doesn’t recognize "&" in path names for DOS apps?

by planetearth . Updated 15 years ago

My client is trying to use a DOS-based app under Windows XP SP3 that worked fine under Windows 98. The app has most of its files in the c:\$opsmg folder. The app has hundreds of files; many of them are batch and configuration files.

Under Windows 98, the program ran properly with the “default” .PIF file. Under XP, it won’t run at all unless I edit every batch file and put quotes around the path name. Unfortunately, there are other files which I can’t access and which have the path name hard-coded into them.

Not one of XP’s “Compatibility Modes” helped with this problem. As long as I put quotes around the path in every batch file, I don’t even need to worry about a Compatibility Mode.

Putting c:\&opsmg in PATH statements in the AUTOEXEC.BAT and Environment Variables didn’t help, either.

Here’s the batch file that starts the app:

echo off
cls
if exist \&opsmg\opspace.exe if exist \&opsmg\opca03.exe goto opms
:ERROR
goto end
:OPMS
cd\&opsmg
opspace 56
security
opca03
:END

There are dozens more like this, and if I miss one, the app crashes.

Any ideas on what I can do to “force” XP to accept a directory that starts with “&”? (I know this is supposed to be allowed, but I’ve found no mention of how DOS apps work with this under XP.) I figure if I can force/trick XP, then the DOS app’s batch and .SYS files won’t need to be modified.

Thanks!

Steve

This discussion is locked

All Comments