Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setver(CMD) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 setver(CMD)                     19 June 1992                     setver(CMD)


 Name

    setver - set the MS-DOS version number that MS-DOS version 5.0 reports to
    a program

 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]

    MS-DOS displays two columns:  the left column lists the names of the pro-
    gram files; the right column lists the corresponding MS-DOS version with
    which each file is set to run.

 Description

    You can use this command to display and modify the version table, which
    lists names of programs and the number of the MS-DOS version with which
    they are designed to run.  If you are using a program that has not been
    updated for MS-DOS version 5.0, you can add its name to the version table
    by using the setver command.

 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 wild-
                card (* or ?).

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


 Switches


    /delete     Deletes the version-table entry for the specified program
                file.  You can abbreviate this switch as /d.

    /quiet      Hides the message typically displayed during deletion of an
                entry from the version table.


 Notes


    Loading the version table into memory

    Before you can use the setver command, the version table must be loaded
    into memory by a device command in your CONFIG.SYS file.  By default, the
    MS-DOS setup program modifies your CONFIG.SYS file to ensure that the
    version table is loaded into memory each time you start your system.

    Setting the version number of a command interpreter

    You can use setver to set the version number of a command interpreter;
    however, if you set the version number of the MS-DOS version 5.0 command
    interpreter (COMMAND.COM), you may not be able to start your system.

    Using the version table

    Many programs designed to run with a previous version of MS-DOS will run
    correctly with MS-DOS version 5.0.  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 with MS-DOS
    version 5.0.  By interpreting MS-DOS version 5.0 as the earlier version,
    the program will probably run correctly; however, using setver will not
    solve the problem if the program is not compatible with MS-DOS version
    5.0.

    setver confirmation

    If you make changes to the version table and no errors are detected,
    MS-DOS displays the following message:

       WARNING - The application you are adding to the MS-DOS version table
       may not have been verified by Microsoft on this version of MS-DOS.
       Please contact your software vendor for information on whether this
       application will operate properly under this version of MS-DOS.  If
       you execute this application by instructing MS-DOS to report a
       different MS-DOS version number, you may lose or corrupt data, or
       cause system instabilities.  In that circumstance, Microsoft is not
       responsible for any loss or damage.

       Version table successfully updated The version change will take effect
       the next time you restart your system


    Restarting after updating the version table

    When you update the version table by adding or deleting entries, you must
    restart your system before the changes will take effect.

    Updating existing entries

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

    setver exit codes

    The following list shows each exit code and a brief description of its
    meaning:

         0    setver successfully completed its task.

         1    The user specified an invalid command switch.

         2    The user specified an invalid filename.

         3    There is insufficient system memory to carry out the command.

         4    The user specified an invalid version-number format.

         5    setver could not find the specified entry in the version table.

         6    setver could not find the SETVER.EXE file.

         7    The user specified an invalid drive.

         8    The user specified too many command-line parameters.

         9    setver detected missing command-line parameters.

         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.

    You can use the errorlevel parameter on the if command line in a batch
    program to process exit codes returned by setver. For an example of a
    batch program that processes exit codes, see the backup(CMD) command.

 Examples

    Suppose you have a program file named MYPROG.EXE that runs with MS-DOS
    version 3.30.  To run MYPROG.EXE, you must first use the setver command
    to create an entry in the version table that will cause MYPROG.EXE to
    interpret MS-DOS version 5.0 as version 3.30:

       setver myprog.exe 3.30


    To delete the MYPROG.EXE entry from the version table (without otherwise
    affecting the MYPROG.EXE file), type the following command:

       setver myprog.exe /delete


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

       setver c:


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026