Microsoft KB Archive/61925

= The Effect of Replacement Parameters in PATH Statement =

Article ID: 61925

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft MS-DOS 3.1
 * Microsoft MS-DOS 3.2 Standard Edition
 * Microsoft MS-DOS 3.21 Standard Edition
 * Microsoft MS-DOS 3.3 Standard Edition
 * Microsoft MS-DOS 3.3a
 * Microsoft MS-DOS 4.0 Standard Edition
 * Microsoft MS-DOS 4.01 Standard Edition
 * Microsoft MS-DOS 5.0 Standard Edition
 * Microsoft MS-DOS 5.0a
 * Microsoft MS-DOS 6.0 Standard Edition
 * Microsoft MS-DOS 6.2 Standard Edition
 * Microsoft MS-DOS 6.21 Standard Edition
 * Microsoft MS-DOS 6.22 Standard Edition

-



This article was previously published under Q61925



SYMPTOMS
You may receive the &quot;Incorrect DOS Version&quot; error if you execute an MS-DOS command (MODE, for example) and your AUTOEXEC.BAT file has two PATH statements similar to the following: PATH=C:\DOS; PATH=C:\P3;%PATH% Recopying the MODE.COM file from your MS-DOS floppy disk to your DOS subdirectory does not correct the error.



CAUSE
This problem occurs because MS-DOS is looking for the command in the wrong directory.



RESOLUTION
To correct this problem, you need to rewrite your PATH statement.



MORE INFORMATION
When your AUTOEXEC.BAT file is run, the path is set to C:\DOS (the DOS subdirectory). When it executes the second path statement (PATH=C:\P3;%PATH%), the path is reset to C:\P3 (the P3 subdirectory) and the C:\DOS path is appended to this. When the AUTOEXEC.BAT file is finished running, your path is set to C:\P3;C:\DOS, in this order.

When you issue a command (in this case, the MODE command) with the above path set, MS-DOS searches the current directory. If the command isn't found in the current directory, MS-DOS searches the P3 subdirectory. If the command still isn't found, MS-DOS searches the MS-DOS subdirectory.

The &quot;Incorrect DOS version&quot; error occurs because there is a MODE command in your P3 subdirectory. When the MODE command is issued, MS-DOS is finding the MODE command in the P3 subdirectory rather than the MODE command in the DOS subdirectory. To avoid this, you can do either of the following:

  Combine the two PATH statements so that one of them reads as follows PATH=C:\DOS;C:\P3; then delete the second PATH statement. -or-

  Change the second PATH statement to read as follows: PATH=%PATH%;C:\P3 

Either of these solutions forces MS-DOS to search the DOS subdirectory before the P3 subdirectory.

Additional query words: 6.22 3.2x 3.30 3.30a 4.00 4.00a 4.01 5.00 5.00a 6.00 6.20 \* yeswin4

Keywords: KB61925

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.