# Silent MBR boot of stage 1.5 grub4dos (works for both 0.4.5c and 0.4.6) - one reboot is required for it to permanently take affect.
### if exist /_ISO/docs/PatchMyMBR call /_ISO/docs/PatchMyMBR > nul
# Silent startup of grub4dos - no diagnostic/info messages (only works for 0.4.6a by changing debug msg=2 to debug msg=0) - permanently changes /grldr files (please use \_ISO\docs\patchme for patch if not using 0.4.6)
# ---- IF YOU ARE USING A REMOVABLE USB FLASH DRIVE FOR E2B (or are not going to use a 'Helper' USB flash drive) ---
# no need to search for WINHELPER.USB so set NOHELPER=1 (or use if E2B hangs at 'Looking for WINHELPER.USB...' )
# speeds up booting to Main Menu slightly - only use if E2B drive is Removable Flash drive!
###set NOHELPER=1
# Suppress Win8/10/2016/2019 'Press any key for Windows Repair/Setup only...' prompt
###set NOREPAIR=1
# If you set the TSUG variable (suggested timeout in seconds) in your \_ISO\MyE2B.cfg file, you can change the timeout behaviour of QRUN.g4b Auto-Suggest, e.g.
# No timeout - auto-suggest will always wait for the user to press a key
# use default timeout of 6 seconds, but if user does not press a key, always use the suggested file extension (if it is not .isoask), valid range = 990 to 999
###set TSUG=993
# Always wait for user - if user presses ENTER only, the suggested file extension will be used instead of the current file extension
###set TSUG=990
# --- GRUB4DOS 0.4.6 + USB DRIVERS ---
# Automatically load grub4dos usb 2.0 driver if Plop! boot loader has been used
# Used when booting E2B under VMWare when using a Plop! boot ISO
### set TESTPLOP=1
# To prevent E2B refusing to boot if Partition 4 (hd0,3) is present, uncomment the two ### lines below -
# WARNING: THIS WILL ERASE PTN #4 (hd0,3) ON THE E2B DRIVE EACH TIME YOU BOOT! ONLY USE WITH E2B USB DRIVES!
# To always erase Partition 3 on boot, uncomment the two ### lines below - check ptn 3 is not used or you may delete a data partition on your E2B drive!
# WARNING: THIS WILL ERASE PTN #3 (hd0,2) ON THE E2B DRIVE EACH TIME YOU BOOT! ONLY USE WITH E2B USB DRIVES!
# Display background image and cursor immediately so startup messages are printed over the background (but screen won't scroll nicely if it gets full of text!)
# call Fn.70 3
# Set cursor outside of the screen so no text or cursor is seen for a while (cursor set to column 0 row 128!)
# call Fn.5 0 128
# Turn off cursor and splashimage until Main Menu is shown - useful if you have disabled startup messages and don't want the cursor character at the top of the screen!
# call Fn.70 0 ;; clear
# If you want to get rid of any earlier screen text use clear
# clear
# Examples (use ONE of the following lines by removing the ### characters)
# Use this line for a blank screen startup with no progress messages. Tip: use patchme to prevent early grub4dos messages (see \_ISO\docs\PatchMe_ReadMe.txt)
###call Fn.70 0 ;; clear ;; call Fn.5 0 128 ;; set redirp=> nul ;; set redir=> nul
# Use this line to display the background image as early as possible
###call Fn.70 3 ;; set redir=> nul
# Use this line to display the background image as early as possible with no startup messages except an initial quick 'Please wait...' message
# SUPPRESS STARTUP FILE ENUMERATION INFORMATIONAL MESSAGES from AUTOMN.g4b, etc.
###set redir=> nul
# SUPPRESS OTHER (important) E2B MENU.LST PROGRESS MESSAGES (NOT recommended!)
###set redirp=> nul
# Always display uniform single-colour screen 0xRRGGBB on loading menu (even if a wallpaper was previously loaded - e.g. when using F8) - useful if using STAMPS but not using a wallpaper
###splashimage --fill-color=0x000000
# Note: redir and redirp may affect the messages displayed when a .imgPTN file is selected. Read more at
# E.g. The user can type '23' to select item 23 in the menu and so it is useful to have the menu item numbers displayed on the menu.
# Auto-numbering is enabled by default (AUTONUM=0x2001). AUTONUM=CCMM where CC is the marker/arrow character (byte) and MM is 00 (off), 01 (number bootable entries) or 02 (number all entries)
# Use AUTONUM=0x2000 to turn auto-numbering off, 0x2001 sets numbering on with a space after number (default), 0x2d01 autonumber with hyphen after number, 0x1a01 arrow, 0x3a01 colon, 0x0701 dot
# e.g. 0x2d00=?menutext, 0x2d01=?nn-menutext (where nn=two-characters for menu numbering 0-9/10-99)
# Turn off auto-numbering
###set AUTONUM=0x2000
# Turn off the arrow menu pointer (safer than using write 0x8308 0) (E2B v1.A0+) setmenu --triangle-off requires grub4dos 0.4.6a 2018-07 or later
# set a short bar for background of highlighted menu entry (E2B v1.A0+) requires grub4dos 0.4.6a 2018-07 or later
###set SHORT_HL=1
# centre the menu entries inside the menu area (and centre help text under menu) - requires grub4dos 0.4.6a 2018-07 or later
###setmenu --middle-align
# sets the Default menu entry that will be highlighted when the WINDOWS INSTALL MENU is displayed
###set DEFM_WIN=1
# If DEFMENU=0 then the '0 Set default menu entry and timeout' menu item in the Main menu will not be listed
###set DEFMENU=0
# WINCOUNT variable will cause all the \_ISO\Windows ISOs to always be enumerated on a FASTLOAD boot
###set WINCOUNT=1
# If NOF7HD is set then the 'Boot from HDD0 F7' menu entry is suppressed in all menus
###set NOF7HD=1
# If the NOF8B is set then the Windows menu will not display 'F8 Back to Main Menu'
###set NOF8B=1
# if NOF8MAIN is set then no F8 Main menu entry will be available
###set NOF8MAIN=1
# If NOF9R is set then the 'F9 Reboot menu' item will not be listed in any menu (remember to change HELPTEXT too)
###set NOF9R=1
# If NOF10H is set then the 'F10 Power Off/Halt' menu item will not be listed in any menu (remember to change HELPTEXT too)
###set NOF10H=1
# Don't display the F1 HELP entry in the Main menu
###set NOF1=1
# NO FASTLOAD MENU - If you don't want the user to see the Main Menu entry to enable or disable FASTLOAD, and disable the Status indicator line
###set NOFLDMNU=1
###set NOFLDST=1
# NOWMENU causes a Windows Install sub-sub menu to return back to the Main menu rather than return to the Windows Install menu
###set NOWMENU=1
# NOWINMAIN cause the Windows Main Menu entry to be suppressed (even if there are \_ISO\WINDOWS\xxx\yyy.ISO files present
###set NOWINMAIN=1
# Set Help Menu text area (the text displayed when a menu entry is highlighted) size/properties
# hstart = x position of menu help text (default = rstart-1), min = 1, 0=use menu width and menu start
# hwidth = width of menu help text (default = menuw+2), 0=use whole width - 2 x hstart, can display help text to right of menu (e.g. hstart=65 hwidth=34 tophelp=8 topstart=4 rstart=4)
# Warning: Graphics corruption will occur if you exceed the width of the screen (hwidth+hstart < 100 for 800x600)!
### set hwidth=70 && set hstart=6
# Write text to the menu (grub4dos 0.4.6a only) - setmenu --string=x=y=colour="text" - all commands are cached\remembered by grubdos until menu is re-loaded or strings cleared (max. 16 strings)
# clear all previous strings
###setmenu --string=
# auto-add next string to grub4dos display cache buffer (up to 16 commands allowed) - old syntax (deprecated - do not use)...
###setmenu --string=69=18=0xFF00FF="Hello"
# NEW SYNTAX - USE iINDEX = i0-i15, can also use background colour and m or s to centre text
# You can also draw lines and boxes - create-your-website-with-blocks/configure-e2b/draw-lines-and-boxes/
# --- CHARACTER SET FONTS ----
# Font settings - specify alternate unifont hex file which is loaded after the E2B unifont file is loaded - many 16-pixel fonts are in /_ISO/docs/Fonts/ folder
# Special non-ANSI characters are not included, so only suitable for English language really
# if the filename contains ".f24" E2B will use large fonts without needing 'set FONTH=24' to be set
###set FONT=()/_ISO/docs/Fonts/terminus.uni.gz
set FONT=()/_ISO/docs/Fonts/xingshu.f24
# Use Default BIOS Font (tends to be thick+bold for standard ASCII characters)
###set BIOSFONT=1
# Do not load unifont fonts - if NOUNIFONT=1 then the standard E2B unifont font file is not loaded (to save time) but only ANSII characters will be displayed
### set NOUNIFONT=1
# LARGE FONTS - FONTH specifies the font height - only valuies of 16 or 24 are allowed (default = 16 = full unifont character set)
# If you set FONTH=24 E2B will use a *limited* default set of 24-pixel high fonts (grub4dos 0.4.6a only)
###set FONTH=24
# If you set FONT24 to the path of a 24-pixel font, E2B will use that font as the default font
# Remember to set HBTM correctly to prevent the screen from scrolling!
###set HBTM=2300
# You can also load your own font after the default fonts have been loaded by using the FONT parameter - if FONTH=24 then the hex font file must be 24-high format
# If 24 pixel high: 1024x768=85 chars x 32 lines, 800x600=66x25 lines
# 24 pixel high fonts: yxt.f24=trad Chinese, ltxxx.f24, terminal.f24, developer.f24, X11.f24 - some fonts may not work in some languages
# E2B will allow you to press the first letter of a menu item to jump to it - grub4dos keys p, e, b and c keys will only work if SHIFT is held down
# AUTOMENU = OFF will disable the AUTOMENU jump feature and special grub4dos p, e, b, c keys must be lower case (don't hold down SHIFT key)
###set AUTOMENU=OFF
# SET DEFAULT MAINMENU ITEM AND TIMEOUT
# Information: Create an \_ISO\menu_defaults.txt file
# Set the default entry and timeout in the menu_defaults.txt file (debug 0 prevents menu item number at top right from being displayed)
# DO NOT UNCOMMENT THE LINES BELOW! They should not be set in this file!
# e.g. use these 3 lines in the menu_defaults.txt file for the first menu item as default and 0 seconds timeout (-1) - remove the # signs
# default 0
# timeout -1
# debug 0
# This will fix which initial main menu default entry will be highlighted and the timeout in seconds.
# You must also set DEFMENU=0 to suppress the 'Set default menu entry and timeout' menu entry
# ---- GFX menu support ----
# If you really want to use a gfxmenu or @DED-LEGO@ or GFX-RIPPER then specify the 'message' file here -
# There are many gfxmenu limitations (on error goes into text mode, no timeout or default option, number of ISOs cannot be displayed, etc. etc.)
# Tip: grub4dos 0.4.6a and E2B now supports large fonts - see FONTH below
# Place your gfxmenu file in the /_ISO folder. Change the GFX= line to match the name of your file (path is always relative to \_ISO)
set GFX=
###set GFX=message
###set GFX=docs/Templates/GFXMenu/message
# ---- TEXT MODE (no fancy wallpaper and no unicode font used - quick to load) ---
# NO GRAPHICS MODE OR WALLPAPER or GFXMenu
# Text-mode menu (no wallpaper) - suppresses graphics mode (must use 'GFX=none') for 80x25 lines
# Try these settings if using text mode - set HBTM=2301 set HCOLOUR=0104 set FCOLOUR=0104
# and use these text colours - color normal=light-cyan/dark-gray highlight=red/cyan helptext=yellow/light-gray standard=light-cyan/black border=red/black
# See "\_ISO\docs\MyThemes\TextMinimal.cfg" for an example MyE2B.cfg file.
###set GFX=none
# ---- KEYBOARD TYPE -----
#set which keyboard you are using (use one only!) - see the KBD_xxxx.g4b files in the grub folder if you want to modify the key mapping
#Note: Passwords may not work properly if the keyboard scan code mapping is not correct! Default = US keyboard (set KBD=)
###set KBD=KBD_AZERTY.g4b
###set KBD=KBD_FRENCH.g4b
###set KBD=KBD_GERMAN.g4b
###set KBD=KBD_ITALIANO.g4b
###set KBD=KBD_JAPAN_106.g4b
###set KBD=KBD_QWERTY_UK.g4b
###set KBD=KBD_QWERTZ.g4b
###set KBD=KBD_SPANISH.g4b
###set KBD=KBD_QWERTZ_HUN.g4b
# set the keyboard type now (optional)
# the next line ensures the correct keyboard scan codes will be recognised if using a non-USA keyboard (not required unless asking for password later on in this cfg file)
###if not "%KBD%"=="" call /%grub%/%KBD% > nul
# ---- LANGUAGE SUPPORT ----
# To change language from ENGlish, look for supported language folders in the \_ISO\e2b\grub\xxx folders
# e.g Arabic. Uncomment first line below to right-align menu entries. RTL=1 means use menuw value - or set RTL=<number> - e.g. 'set RTL=58' to adjust position of menu headings
# use RTL for RIGHT-TO-LEFT LANGUAGES only, GERMAN_ALT has different alignment of [hotkey] characters in menu
###if "%LANG%"=="" set LANG=ARABIC && set RTL=1 && set AUTONUM=0 && write 0x8308 0 > nul
###if "%LANG%"=="" set LANG=CZECH
###if "%LANG%"=="" set LANG=DUTCH
###if "%LANG%"=="" set LANG=ENG
###if "%LANG%"=="" set LANG=FRENCH
###if "%LANG%"=="" set LANG=GERMAN
###if "%LANG%"=="" set LANG=GERMAN_ALT
###if "%LANG%"=="" set LANG=GREEK
###if "%LANG%"=="" set LANG=ITALIAN
###if "%LANG%"=="" set LANG=POLISH
###if "%LANG%"=="" set LANG=PORTU_BRAZIL
###if "%LANG%"=="" set LANG=ROMANIAN
###if "%LANG%"=="" set LANG=RUSSIAN
###if "%LANG%"=="" set LANG=SIMP_CHINESE
###if "%LANG%"=="" set LANG=SPANISH
###if "%LANG%"=="" set LANG=SWEDISH
###if "%LANG%"=="" set LANG=TRAD_CHINESE
###if "%LANG%"=="" set LANG=UKRAINIAN
###if "%LANG%"=="" set LANG=VIETNAMESE
###if "%LANG%"=="" set LANG=HUNGARIAN
###if "%LANG%"=="" set LANG=INDONESIAN
# User Language Selection example code - prompt user before Main Menu is displayed - see \_ISO\e2b\grub folders for all available languages
# Uncomment all the following lines (remove ###) to ask user to choose a different language (edit as required)
###if not "%DONEMENU%"=="" goto :skplang
###echo CHOOSE A LANGUAGE
###echo
###echo C = Chinese (Simplified)
###echo TC = Chinese (Traditional)
###echo E = English
###echo G = German
###echo S = Spanish
###echo
###set /p ask=Which language :
###if /i "%ask%"=="C" set LANG=SIMP_CHINESE
###if /i "%ask%"=="TC" set LANG=TRAD_CHINESE
###if /i "%ask%"=="G" set LANG=GERMAN
###if /i "%ask%"=="S" set LANG=SPANISH
###if /i "%ask%"=="E" set LANG=ENG
###:skplang
# ----- SOUND ALARM IF SOMEONE BOOTS WITHOUT CAPS LOCK ON ------
# Check for CAPS LOCK on boot - if not on then sound alarm and switch off system if user presses a key
# get special keys - e.g. SHIFT, CTRL, etc. into n for use later
# for a better method of password input, create-your-website-with-blocks/configure-e2b/passwords-and-security/
# the next line changes the font immediately but can cause a delay whilst it loads - ensure in graphics mode
###font ()/%grub%/unifont.hex.gz
# You should have already set the keyboard type previously (e.g. QWERTZ)
:mpwd
# If you want to set a Master password for Easy2Boot to prevent anyone from using it on first boot
# (e.g. 'fred') uncomment and edit the lines below (you can use password --md5 xxxxxxxx format if you wish)
###if exist DONEMENU goto :pok
###clear && echo && echo ENTER E2B MASTER PASSWORD
###debug 0
###password fred && goto :pok
###echo && set /p:2 ask=WRONG PASSWORD!
###goto :mpwd
:pok
###if not exist DONEMENU echo
# To reboot if the password is wrong, replace the line goto :mpwd with the grub4dos command reboot
# This will cause the wallpaper background to be always loaded before displaying the Main Menu - only needed if you enable FASTLOAD *AND* use splashimage for Master password as above
###set DONEMENU=
# --- MONTHLY PIN CODE ---
# The user must enter the "4 digit PIN code of the month"
# Windows PIN CALCULATOR app is available on request
# VARIABLES BELOW CAN AFFECT ACTIONS OF TP.g4b
# SEED - 4 digits - this is your special SEED number - default is 1985
# set number of allowed attempts - default is very large!
#
# SPECIAL OPTIONS: TESTPIN and PINRETURN
# set TESTPIN as first user guess or else user will be prompted for PIN code - if pin code is wrong, user will be prompted again (unless ATTEMPTS=1)
# if PINRETURN is set then call to TP.g4b will always return after n ATTEMPTS or on success. PINRETURN=OK if correct pin number was used.
# Typical use: Uncomment only the 6 ### lines, set ATTEMPTS and SEED. E2B Version line can be altered for any special message you like.
# Do not uncomment ##SS# lines unless needed (create-your-website-with-blocks/configure-e2b/passwords-and-security/)
###if not exist /%grub%/TP.g4b halt
###if exist DONEMENU goto :TPfin
###set SEED=1985
###set ATTEMPTS=3
##SS#set TESTPIN=8684
##SS#set PINRETURN=1
###echo E2B VERSION %VER%
###call /%grub%/TP.g4b
##SS#if not "%PINRETURN%"=="OK" reboot
##SS#if "%PINRETURN%"=="OK" clear
:TPfin
# --- ENCRYPT FILES ---
#Tip: For even better security, use 7Zip to compress this MyE2B.cfg file to GZip format or use lzma.exe (See )
# \_ISO\docs\E2B Utilities\LZMA has useful batch files to encrypt files
# You must keep the file name unchanged (e.g. MyE2B.cfg) and can also set it's file attribute to 'Hidden' and 'System' or set permissions if NTFS E2B drive used.
# ---- SET AN EXPIRY DATE - EXAMPLES -----
# Change the 20160320 date below to alter the expiry date and change the message - you can use reboot instead of halt, Fn.73 3 waits for 3 seconds
###if 20160320<=%@date:~0,4%%%@date:~5,2%%%@date:~8,2% echo THIS SOFTWARE HAS EXPIRED! && call Fn.73 3 && halt
# Program hotkeys to work in ALL menus - no separate menu entry is required. Some examples shown below.
# Add global hotkeys - examples only - use ;; or ;& or && to separate commands.
# Use @ to prevent commands displaying on screen when hotkey pressed - e.g. "@(bd)/%grub%/qrun.g4b force.isodefault /_ISO/Linux/Ubuntu.iso ;; boot" > nul
# XP ISO UNATTEND.TXT SUPPORT - if PICKAUTO is set then user will be asked to select \_ISO\WINDOWS\XP\*.AUTO files for Unattend.txt\Winnt.sif selection
# .SIF file must have OemPreinstall=No or will get 'missing file' errors
###set PICKAUTO=YES
# Use if black screen on boot to XP Setup (some Dell systems with buggy BIOSes need this) - if 0 does not work, try 1-9 (default is -1)
###set E820=0
# ---- ZALMAN\IODD HDD ENCLOSURE -----
# If file extension is .ISO, then ask user how to run it (e.g. run as if .ISOPE or .ISOWINVH, etc.)
# Use if you have a Zalman Virtual CD USB HDD caddy you may want to keep all .iso files as .iso (tip: use a .txt file with a help entry to remind you which one works best!)
###set ISOASK=1
# --- MENU SORTING ---
# Turn off alphabetical sorting of menu entries (speeds up enumeration of menus slightly - NOT recommended!) - note multiple wallpapers won't work if you set this!
###set NOSORT=1
# --- SPEED UP MENU LOADING IF MANY ISO/IMGPTN FILES IN MENU FOLDERS ---
# Disable volume information of ISO file displayed in menu help text and do not warn user if file is not contiguous
###set QMENU=1
# --- CHECK BIOS FOR 137GB BUG ---
# Do not check the BIOS to see if it has the >137GB USB disk access bug (e.g. as found on some Asus EeePCs) Tip: try formatting the drive using RMPrepUSB first!
# Useful to suppress warning when your E2B drive is >137GB but E2B is on the first partition which is <137GB so it will work correctly
###set CHECKBIOS=
# ----- REDUCE MEMORY USAGE -----
# This disables the loading of batch file modules into memory for faster execution (so MOD=1 may slower - not recommended)
# If too many files or variables cause grub4dos to crash then uncomment the next line
###set MOD=1
# Use HLT instruction to reduce CPU cycles whilst waiting for keypress (stops CPU from getting too hot) - this also prevents animations and tunes from playing
### write --bytes=1 0x8205 0x20 > nul
# --- DEBUG MODE -
# Displays boot timings just before Main Menu is displayed - use for diagnosing/measuring slow boot times (can also press ! key during boot to show times)
###set SHOWTIME=1
# Always pause after menu file enumeration - Note: instead of using ENUMWAIT, just press the SPACEBAR during file enumeration and it will pause before it displays the menu
###set ENUMWAIT=1
# --- PROMPT USER FOR FASTER BOOT ----
# Add 3 lines below to prompt for faster boot option (for BIOSes with poorly-written and slow USB drivers) (will need to adjust menu size)
###set ask=
###if not exist DONEMENU set /p:3 ask=Speed up booting (no wallpaper or unifont not loaded) (Y/N) :
###if not exist DONEMENU if /i "%ask%"=="Y" set NOUNIFONT=1 && set GFX=none && set noitems=16 && set tophelp=18 && set HBTM=2300
# --- STAMPS and ANIMATION ---
# see for more details
# Specify stamps to overwrite the wallpaper. Format: set STAMPn=type=x=y (filespec), type: 0=normal, 0x80=transparent background