Sets the MS-DOS version number that the MS-DOS subsystem reports to a program. Used without parameters, setver displays the current version table.


setver [Drive:Path] [FileName n.nn]

setver [Drive:Path] [FileName [/delete [/quiet]]

To display the current version table, use the following syntax:

setver [Drive:Path]


[ Drive : Path ] : Specifies the location of the Setver.exe file.

FileName : Specifies the name of the program file (.exe or .com) that you want to add to the version table. You cannot use a wildcard (* or ?).

n.nn : Specifies the MS-DOS version (for example, 3.3 or 4.01) that the MS-DOS subsystem reports to the specified program file.

/delete : Deletes the version table entry for the specified program file. You can also use /d.

/quiet : Hides the message that is usually displayed when you delete an entry from the version table.

/? : Displays help at the command prompt.


  • Windows XP does not use this command. It is accepted only for compatibility with MS-DOS files.

  • This tool is not available on Windows XP 64-Bit Edition.

  • Using the version table

    Many programs designed to run with a previous version of MS-DOS run correctly with Windows XP. In some cases, however, a program might not run correctly unless its name is included in the version table. The table indicates to the program that it is running with the MS-DOS version for which it was designed, even though it is running in the MS-DOS subsystem. By interpreting MS-DOS version 5.0 as the earlier version, the program should run correctly, however, setver does not solve the problem if the program is not compatible with Windows XP.

  • Loading the version table into memory

    Before you can use setver, the version table must be loaded into memory by inserting a device command in your Config.nt file.

  • Restarting after updating the version table

    When you update the version table by adding or deleting entries, you must start a new command prompt session to reread the version table.

  • Updating existing entries

    If you specify a file name that is already in the version table, the new entry replaces the existing entry.

  • Understanding setver exit codes

    To process exit codes returned by setver, use the errorlevel parameter on the if command line in a batch program. For an example of a batch program that processes exit codes using if, see Related Topics. The following table lists each exit code and a description.

    Exit code



    Setver successfully completed its task.


    The user specified an invalid command-line option.


    The user specified an invalid file name.


    There is insufficient system memory to carry out the command.


    The user specified an invalid version number format.


    Setver cannot find the specified entry in the version table.


    Setver cannot find the Setver.exe file.


    The user specified an invalid drive.


    The user specified too many command-line options.


    Setver detected missing command-line options.


    Setver detected an error while reading the Setver.exe file.


    The Setver.exe file is corrupt.


    The specified Setver.exe file does not support a version table.


    There is insufficient space in the version table for a new entry.


    Setver detected an error while writing to the Setver.exe file.


To run Myprog.exe, a file that runs with MS-DOS version 3.30, create an entry in the version table that enables Myprog.exe to interpret the MS-DOS subsystem as version 3.30 by typing:

setver myprog.exe 3.30

To delete the Myprog.exe entry from the version table, without otherwise affecting the Myprog.exe file, type:

setver myprog.exe /delete

To list the contents of the version table on drive C, type:

setver c:

Formatting legend




Information that the user must supply


Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output



Command-line reference A-Z