Batch File Environment Variables and DOS Version 2.x

ID Number: Q27101

5.00 5.10 5.10a

MS-DOS

Summary:

SYMPTOMS

The batch files that come with Microsoft Macro Assembler (MASM)

version 5.0, 5.1, and 5.1a use environment variables (i.e., %var%)

to set various configuration variables. Under MS-DOS versions 2.x,

when %var% should evaluate to NULL, it will actually be evaluated

as "var%", ignoring the first "%" and causing errors, as would be

expected.

These batch files include the following:

DEMO.BAT

SETUP.BAT

RUNME.BAT

SETUP2.BAT

MAKESHOW.BAT

CAUSE

This environment variable feature was not supported before MS-DOS

versions 3.0.

RESOLUTION

Workarounds for this problem would be to either update DOS to a

3.x version or later, or edit the batch files to eliminate those

variables that would be set to NULL.

STATUS

Later versions of MASM require MS-DOS version 3.0 or later.