Question

Locked

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

By planetearth ·
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
PMS
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 conversation is currently closed to new comments.

15 total posts (Page 2 of 2)   Prev   01 | 02
Thread display: Collapse - | Expand +

All Answers

Collapse -

Reponse To Answer

by planetearth In reply to 2 Options

Thanks, but this XP machine also scans images, retrieves e-mail, and does a few other network-based things. I can't really replace it with a DOS system. And this XP machine is here now because the Windows 98 machine finally died.

I agree 500% that the owner needs to replace all of this...and I've been telling him that for more than 2 years now. Until the computers just stop working, he thinks they're basically fine.

Steve

Collapse -

Add ^ before &

by EricKs2008 In reply to Windows XP doesn't recogn ...

Add ^ before &
or do not use &
-----------------------
echo off
cls
if exist \^&opsmg\opspace.exe if exist \^&opsmg\opca03.exe goto opms
:ERROR
goto end
PMS
cd\^&opsmg
opspace 56
security
opca03
:END

Collapse -

Reponse To Answer

by planetearth In reply to Add ^ before &

Thanks.

That works, and it's a bit easier than adding the quotation marks, but it still requires that I edit every batch file. I was hoping to set something globally in XP to "trick it" into ignoring the ampersand so I wouldn't have to edit every batch file.

Steve

Collapse -

The VM option should be easier

by mastersataberdeen In reply to Windows XP doesn't recogn ...

Hi Steve,
As Chas said above, I think the VM option is the easiest way to go and you get to keep your XP system. You can grab VMWare Player or VirtualBox off the Net, set up a small Windows98 VM on the XP box and out your application in there. It will run with no modification. Good luck.

Collapse -

Reponse To Answer

by planetearth In reply to The VM option should be e ...

It looks like that's what I'll have to do, yes.

I know a new, quad-core desktop or laptop would be powerful enough, but I'll also have to throw a parallel-port adapter into it (since the old DOS software only prints to LPT1 or LPT2).

All in all, I'd rather see my client just get new (or newer) software. It's difficult enough keeping the old hardware running--especially since they're all Vaio laptops from 1999.

Thanks, everyone!

Steve

Back to Software Forum
15 total posts (Page 2 of 2)   Prev   01 | 02

Related Discussions

Related Forums