Export (0) Print
Expand All
Dos
Mem
Msg
Expand Minimize

Setver

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

Syntax

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]

Parameters

[ 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.

Remarks

  • 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

    Description

    0

    Setver successfully completed its task.

    1

    The user specified an invalid command-line option.

    2

    The user specified an invalid file name.

    3

    There is insufficient system memory to carry out the command.

    4

    The user specified an invalid version number format.

    5

    Setver cannot find the specified entry in the version table.

    6

    Setver cannot find the Setver.exe file.

    7

    The user specified an invalid drive.

    8

    The user specified too many command-line options.

    9

    Setver detected missing command-line options.

    10

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

    11

    The Setver.exe file is corrupt.

    12

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

    13

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

    14

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

Examples

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

Format

Meaning

Italic

Information that the user must supply

Bold

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

If

Device

Command-line reference A-Z

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft