TheRedFox
Jun 22 2008, 07:06 PM
I'm doing an online lesson on writing batch files (it's written for 9x computers). I tried sending one to a friend who had XP, and it didn't run because the "choice" command didn't register with the XP computer. I'm wondering if there's some sort of emulator that would have the ability to run a 9x batch file on an NT computer. i understand that alot of commands and syntax are the same, but not all.
crahak
Jun 22 2008, 07:20 PM
Two things:
First, you could grab choice.exe from the win2k resource kit or such, or a similar 3rd party util (Win2003 and Vista do have choice.exe, and I believe Win 2008 does too).
Secondly, why learn the win98 specific stuff, instead of the newer/more recent ways? i.e. SET /P
herbalist
Jun 22 2008, 09:32 PM
There's enough differences between 9X and NT systems that batch files written for one probably won't work on the other. I use a lot of batch files on my 98 boxes. None of them worked properly on a Win2K box without a lot of changes.
Besides the differences in syntax and in the commands themselves, you also have the problem of long file names, which are common on NT systems but have to be truncated for batch files in DOS. The truncated names used by DOS will cause problems in batch files run on NT systems. All the paths are likely to be completely different as well. On NT systems, the batch files run in windows, which limits what can be done with them compared to those running in pure DOS.
I haven't seen an emulator that does what you're asking. Even if one does exist and can handle the differences in the commands, file name length, and the syntax, it wouldn't be able to account for the differences in the paths used in the batch file. You'd still have to edit those manually. It would be easier in the long run just to write separate batch files for each.
Rick
TheRedFox
Jun 24 2008, 04:04 PM
I appreciate all of your input. The reason why I'm learning then 9x syntax is because the tutorial I found happens to use that. also I generally use my Windows 98SE laptop rather than an XP computer.
Th3_uN1Qu3
Jun 24 2008, 06:02 PM
QUOTE (TheRedFox @ Jun 25 2008, 01:04 AM)

I appreciate all of your input. The reason why I'm learning then 9x syntax is because the tutorial I found happens to use that. also I generally use my Windows 98SE laptop rather than an XP computer.
I'm actually glad they're different. I'm doing a XP patch for an older game and i use command line scripts a lot. On 98/Me the batch simply does not run, sparing me of the trouble to implement a version checker.

You can run a virtual 98 machine inside your XP and learn on that.
herbalist
Jun 24 2008, 06:11 PM
One of the better sites I've seen for DOS and Windows command line is at
Computer Hope. They have separate pages for each command and show the differences in the syntax each one needs for both DOS and Windows NT systems.
Some more DOS sites:
http://www.ahuka.com/dos/index.html http://dos.rsvs.net/http://home7.inet.tele.dk/batfiles/batfiles.htmRick
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.