# HELP MENU - check it fits on a 640x480 and 800x600 display - text colour and background color is pre-set in \_ISO\MyE2B.cfg file by  'color standard=fg/bg'  command.
#
if not "%GFX%"=="" gfxmenu /_ISO/%GFX%
if "%HCOLOUR%"=="" set HCOLOUR=0133
#HDG=78 chars for text mode menu
set HDG=\x20                        HELP MENU                                           \x20
set HT=\x20[F8] Main Menu   [F9] Reboot         visit www.easy2boot.com

if not exist HEADPOS set HEADPOS=0000
set HP=0000 $[0004]                                                                \necho -n -e -P:
write (md)0x220+1 !BAT\necho -n -e -P:%HP%%%^HEADPOS% $[\x25HCOLOUR\x25]%HPAD%\x25HEADING\x25\necho -n -P:%HBTM% $[\x25FCOLOUR\x25]%HT%\0 > nul
initscript (md)0x220+1
set HP=

#autonumber boot entries with a space after the number
write 0x8274 %AUTONUM% > nul

if not "%pwd%"=="" password %pwd% 
debug 0


title About Easy2Boot\n Introduction to E2B
clear
echo -e $[0104]ABOUT EASY2BOOT (E2B)
echo
echo Easy2Boot is based on grub4dos, it is open source and free!
echo You can prepare an E2B USB drive using Windows or linux.
echo
echo Every time E2B boots, it enumerates all payload files and creates a menu.
echo Menu entries are ordered alphabetically.
echo Payload files will be listed in a menu as a filename (e.g. fred.iso).
echo .txt files can contain replacement menu text (e.g. fred.iso and fred.txt).
echo .mnu files contain complete grub4dos menu entries, and are also added into 
echo the E2B menu. E2B will search sub-folders for .mnu files.
echo
echo E2B looks at the file extension to determine how to boot the file.
echo A wide range of file extensions are recognised by E2B (e.g. .iso, .ima, .img).
echo
echo Just copy your bootable files to one of the menu folders under \_ISO,
echo e.g. copy your .iso files to the \_ISO\MAINMENU folder.
echo
echo  -e $[0106]The files on the USB drive MUST be contiguous. Before booting E2B,
echo  -e $[0106]always run WinContig (RMPrepUSB - Ctrl+F2)  [or run defragfs under linux].
echo
echo To make your own Help menu, copy \_ISO\e2b\grub\ENG\F1.cfg to the \_ISO folder.
echo To make the F1 key active for all menus, read the \_ISO\Sample_MyE2B.cfg file.
echo To remove this F1 Help menu entry, use  set NOF10H=1  in your MyE2B.cfg file.
echo
echo For more information, visit $[0105]www.easy2boot.com
echo
pause Press any key...
errorcheck off
boot

title Easy2Boot Folders\n Information about E2B folders
clear
echo -e $[0104]EASY2BOOT FOLDERS
echo
echo The following are folders which can be used for payload, .mnu and .txt files.
echo 
echo This folder contains items that you want to appear in the Main (first) menu:
echo -e $[0106] \\_ISO\\MAINMENU
echo
echo These are sub-menu folders:
echo -e $[0106] \\_ISO\\ANTIVIRUS
echo -e $[0106] \\_ISO\\BACKUP
echo -e $[0106] \\_ISO\\DOS
echo -e $[0106] \\_ISO\\LINUX
echo -e $[0106] \\_ISO\\UTILITIES
echo -e $[0106] \\_ISO\\WIN       $[0104](DO NOT USE for Windows Install ISO files)
echo -e $[0106] \\_ISO\\WINPE
echo -e -n $[0106] \\_ISO\\UTILITIES_MEMTEST 
echo - this is a sub-menu folder of the UTILITIES menu
echo
echo The AUTO folder is 'special' and is for payload files only (.mnu files are ignored)
echo -n -e $[0106] \\_ISO\\AUTO  
echo (DIRECT BOOT) - you can also copy payload files to folders under here.
echo
echo Windows Install ISO files MUST be copied to the correct \_ISO\WINDOWS sub-folder:
echo -e $[0106] \\_ISO\\WINDOWS\\SVR2012
echo -e $[0106] \\_ISO\\WINDOWS\\SVR2K8R2
echo -e $[0106] \\_ISO\\WINDOWS\\VISTA
echo -e $[0106] \\_ISO\\WINDOWS\\WIN7
echo -e $[0106] \\_ISO\\WINDOWS\\WIN8
echo -e $[0106] \\_ISO\\WINDOWS\\XP
echo -e $[0106] \\_ISO\\WINDOWS\\WIN10
echo Note: These 7 folders are only for Windows Installer ISO files.
echo
pause Press any key...
errorcheck off
boot

title How to add ISO files\n Help on ISO files
clear
echo -e $[0104]ADDING ISO FILES
echo
echo To add linux 'LiveCD' ISO files, just copy the .iso file to a menu folder,
echo e.g. copy the .iso file to the \_ISO\MAINMENU or \_ISO\LINUX folder.
echo 
echo For Windows Installer ISOs, add the ISO to the correct \_ISO\WINDOWS sub-folder.
echo For example, add an XP Install ISO to the \_ISO\WINDOWS\XP   folder.
echo or add a     Windows 8 Install ISO to the \_ISO\WINDOWS\WIN8 folder.
echo
echo If you have a Hiren's ISO, rename it so that is has a .isowinvh file extension.
echo
echo If you are not sure about what file extension works best, rename
echo your ISO file to have a .isoask file extension.
echo
echo -e $[0105]www.easy2boot.com/add-payload-files/list-of-tested-payload-files
echo
pause Press any key...
errorcheck off
boot

title About .mnu files and persistence for linux\n Help on adding persistent linux OS's
clear
echo -e $[0104]Persistence and .mnu files
echo
echo Easy2Boot can boot from many linux ISOs with Persistence.
echo A special .mnu file is needed for persistence.
echo A .mnu file contains a grub4dos menu entry which is automatically added to the E2B menu.
echo 
echo -e -n Look in the $[0106]\\_ISO\\docs\\Sample mnu Files 
echo folder for a .mnu file that is of a
echo similar type to your linux ISO. Read the instructions inside the .mnu file
echo to see how to use it.
echo
echo There are many other .mnu files in the \_ISO\docs\Sample mnu Files  folder,
echo look through them to see what is available.
echo
pause Press any key...
errorcheck off
boot


title Easy2Boot features\n Some things to try!
clear
echo -e $[0104]Some E2B Features
echo
echo -e $[0105]Tip: Use RMPrepUSB+QEMU to test booting from your E2B USB drive in Windows.
echo
echo 1. Try changing the name of an ISO file to see how it affects the menu order.
echo
echo 2. Try adding a .txt file with the same name as one of your ISO files to change
echo -e \x20  how it is listed in the menu - for more details on .txt files see 
echo -e \x20  www.easy2boot.coma/add-payload-files/change-the-menu-entry-text-using-a-txt-file
echo
echo 3. Add a 800x600 \_ISO\mybackground.bmp file to use as the background.
echo
echo 4. Mac theme - copy the files from \_ISO\docs\Templates\Mac to \_ISO.
echo -e \x20  There are also other themes to choose from in the Templates folder.
echo
echo 5. Choose any theme - read the \_ISO\docs\mythemes\ReadMe.txt file for details.
echo
echo 6. Look at the \_ISO\Sample_MyE2B.cfg file for many different options and settings.
echo -e \x20  Copy the file to \\_ISO\\MyE2B.cfg, edit it and experiment!
echo
echo 7. Look in the \_ISO\docs\Sample mnu Files  folder for special menus.
echo
echo 8. Copy the \_ISO\FASTLOAD.YES file to the root of your E2B USB drive to
echo -e \x20  speed up the appearance of the Main menu (read the \\_ISO\\FASTLOAD_Read_Me.txt file).
echo
echo -e 9. For more ideas, visit $[0105]http://rmprepusb.blogspot.co.uk
echo
pause Press any key...
errorcheck off
boot




title UEFI booting\n How to boot UEFI images
echo -e $[0104]UEFI booting           \x20
echo
echo To UEFI-boot from payloads (e.g. ISO files), you must first convert
echo them to a partition image file (.imgPTN).
echo This can be done by using the MPI Tool Kit from www.easy2boot.com.
echo Just drag-and-drop the .ISO file onto a Windows Desktop shortcut to make
echo the .imgPTN file. Then copy it to the E2B drive, e.g. \_ISO\MAINMENU.
echo
echo The E2B USB drive can be formatted as FAT32 or NTFS (or ext2 or exFAT).
echo
echo To UEFI-boot from a .imgPTN file, first select it from the E2B menu.
echo This will replace the Easy2Boot partition with the contents of the .imgPTN file.
echo You will then see a 'CSM' Menu and various boot options.
echo You can try the Clover option (if present) to boot to a 64-bit EFI file.
echo Alternatively, reboot the computer and choose the UEFI-boot option from
echo the startup menu.
echo
echo To return the Easy2Boot USB drive back to the normal E2B menu,
echo boot from the USB drive in CSM\Legacy Mode instead of UEFI Mode.
echo Then choose the Easy2Boot option from the CSM Menu.
echo
echo -e For more information, visit $[0105]www.easy2boot.com
echo
pause Press any key...
errorcheck off
boot


iftitle [if "%GFX%"==""] ^F8 Main Menu                         [F8]\n Go back to the Main Menu
configfile (md)0xa000+0x50

iftitle [if "%GFX%"==""] ^F9 Reboot                            [F9]\n Reset the computer
reboot


iftitle [if not "%GFX%"==""] Main Menu\n Go back to the Main Menu
configfile (md)0xa000+0x50

iftitle [if not "%GFX%"==""] Reboot\n Reset the computer
reboot
