Command: menu

  MENU displays a menu while running CONFIG.SYS / FDCONFIG.SYS.
  MENU is a CONFIG.SYS / FDCONFIG.SYS command.

Syntax:

   menu [text]

Options:

  text  The text you want to be shown while running config.sys

Comments:

  MENU displays a menu while running CONFIG.SYS / FDCONFIG.SYS.
  Use MENUCOLOR before the menu config command, to create a full
    screen menu which supports the arrow cursor keys.
  Use MENUDEFAULT to set a time delayed default option. Lines that
    begin with 1? will only be processed if the user presses 1.
    Lines beginning with 23? will be loaded if the user presses either
    2 or 3. Options other than 0 can only be selected if at least one
    "numbers?" line actually uses them, as shown in the example below.
  Using with autoexec.bat:
    The ENVIRONMENT VARIABLE CONFIG is set to the menu option value.
    Therefore %CONFIG% can be used in the autoexec.bat in conjunction
    with the if command.
  MENU is a command internal to kernel.sys and needs no other file
  in order to work.

Examples:

  Example 1:
  IN CONFIG.SYS / FDCONFIG.SYS:
    MENU Please Select Configuration:
    MENU
    MENU Option 0    basic stuff only
    MENU Option 1    CD-ROM
    MENU Option 2    TROUSERS
    MENU Option 3    CD-ROM and TROUSERS
    0? ECHO Warning: Only standard drivers !
    13?DEVICE=xdvd2.sys /D:FDCD001
    23?DEVICE=TROUSERS.SYS
  IN AUTOEXEC.BAT:
    IF "%config%"=="1" SHSUCDX /D:FDCD001
    IF "%config%"=="3" SHSUCDX /D:FDCD001
      Means: SHSUCDX is loaded in AUTOEXEC.BAT / FDAUTO.BAT when the
             options 1 or 3 were chosen in CONFIG.SYS / FDCONFIG.SYS

  Example 2:
  IN CONFIG.SYS / FDCONFIG.SYS:
    !COUNTRY=049,858,C:\FREEDOS\BIN\country.sys (german setting)
    !LASTDRIVE=Z
    !BUFFERS=20           (!=will be executed under all circumstances)
    !FILES=40             (!=will be executed under all circumstances)
    !MENUCOLOR=7,0        (!=will be executed under all circumstances)

    MENUDEFAULT=1,5
    MENU 1 - Load FreeDOS with JEMM386 (no EMS, max RAM free)
    MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory)
    MENU 3 - Load FreeDOS low with some drivers (Safe Mode)
    MENU 4 - Load FreeDOS without drivers (Emergency Mode)

    12?DOS=HIGH                   (will be processed when pressing 1/2)
    12?DOS=UMB                    (will be processed when pressing 1/2)
    12?DOSDATA=UMB                (will be processed when pressing 1/2)
    123?DEVICE=C:\FREEDOS\BIN\himemx.exe (     "      "      "     1/2/3)
    1?DEVICE=C:\FREEDOS\BIN\jemm386.exe NOEMS X=TEST I=TEST I=B000-B7FF
             NOVME NOINVLPG       (will be processed when user presses 1)
    2?DEVICE=C:\FREEDOS\BIN\jemm386.exe X=TEST I=TEST I=B000-B7FF NOVME
             NOINVLPG             (will be processed when user presses 2)
    34?SHELL=C:\FREEDOS\BIN\command.com C:\FREEDOS\BIN /E:1024
             /P=C:\FDAUTO.BAT     (will be processed when pressing 3/4)
    12?SHELLHIGH=C:\FREEDOS\BIN\command.com C:\FREEDOS\BIN /E:1024
                 /P=C:\FDAUTO.BAT (will be processed when pressing 1/2)
    ;1234?BREAK=OFF               (set to REM, nothing happens)
    REM 1234?DEVICE=C:\blahblah.sys (set to REM, nothing happens)

  IN AUTOEXEC.BAT / FDAUTO.BAT:
    Depending if you have chosen "1", "2", "3" or "4" in CONFIG.SYS
    your AUTOEXEC.BAT / FDAUTO.BAT can execute different routines, e.g.:
      IF "%config%"=="1" goto :BAT_ROUTINE1
      IF "%config%"=="2" goto :BAT_ROUTINE2
      IF "%config%"=="3" goto :BAT_ROUTINE3
      IF "%config%"=="4" goto :BAT_ROUTINE4
      goto :END

      :BAT_ROUTINE1
      execute commands for routine1
      goto: END

      :BAT_ROUTINE2
      execute commands for routine2
      goto: END

      :BAT_ROUTINE3
      execute commands for routine3
      goto: END

      :BAT_ROUTINE4
      execute commands for routine4
      goto: END

      :END
      cls

See also:

  ; (semicolon)
  ! (exclamation mark)
  ? (question mark)
  autoexec.bat/fdauto.bat
  config.sys/fdconfig.sys
  country (COUNTRY NUMBERS)
  country.sys (COUNTRY NUMBERS)
  dos
  dosdata
  environment variable
  files
  goto
  himemx
  if
  jemm386
  jemmex
  lastdrive/lastdrivehigh
  menucolor
  menudefault
  rem
  shsucdx

  Copyright © 2003 Robert Platt, updated 2011 and 2022 by W. Spiegl.

  This file is derived from the FreeDOS Spec Command HOWTO.
  See the file H2Cpying for copying conditions.