# 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 If you use Easy2Boot, please consider making a donation.
echo
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
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 + 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, .vhd).
echo
echo Copy your bootable files to one of the 2nd level 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.
echo  -e $[0106]Before booting E2B, always run \\MAKE_THIS_DRIVE_CONTIGUOUS.cmd
echo  -e $[0106]or run WinContig, RMPrepUSB (Ctrl+F2), or 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 NOF1=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 folders 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 in 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 all 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 (and other) files\n Help on adding payload files
clear
echo -e $[0104]ADDING PAYLOAD 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 Tip: To install from a linux LiveCD, choose \dev\sdX4 as the 'cdrom' device
echo where X is the USB disk letter (e.g. \dev\sdb4 or \dev\sdc4, etc.).
echo 
echo For Windows Installer ISOs, add the ISO to the correct \_ISO\WINDOWS sub-folder.
echo Add an XP Install ISO to the \_ISO\WINDOWS\XP folder.
echo 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 or convert it to a FAT32 partition image (.imgPTN) file for full functionality.
echo
echo If you are not sure about what file extension works best, rename
echo your ISO file to have a .isoask file extension to try a variety of extensions.
echo
echo E2B can directly boot from Windows 7/8/10 .VHD files and WinPE .WIM files.
echo
echo If an ISO does not work correctly, convert it to a partition image (.imgPTN) file
echo using the MPI Tool Kit.
echo
echo Always check
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
echo By installing linux to a .imgPTN partition file, you can run many different full linux
echo installations. See $[0105]rmprepusb.blogspot.co.uk/p/easy2boot-useful-blogs.html
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 alphabetical 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 appears in the menu - for more details on .txt files see 
echo -e \x20  $[0105]www.easy2boot.com/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\docs\FASTLOAD\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\\docs\\FASTLOAD\\ReadMe.txt file).
echo
echo 9. Run \_ISO\E2B_Editor.exe and design your own menu.
echo
echo -e 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 partition image files (.imgPTN). 
echo
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 MPI_FAT32 Desktop shortcut
echo to make 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
echo You can also switch to a .imgPTN file using a Windows system, by running
echo -e -n $[0102]QEMU_MENU_TEST (run as admin).cmd 
echo to get to the CSM Menu, and then connect the
echo -e -n E2B USB drive to a UEFI system or run 
echo -e -n $[0102]\\_ISO\\SWITCH_E2B.exe
echo .
echo
echo Only payloads which contain .EFI boot files will be UEFI-bootable.
echo
echo You can try the CSM Menu's Clover boot option to UEFI-boot from a .EFI boot file.
echo Alternatively, reboot the computer and choose the UEFI-boot option from
echo the computer's own UEFI startup menu.
echo
echo To return the Easy2Boot USB drive back to the normal E2B menu, boot
echo from the USB drive in CSM\Legacy Mode instead of UEFI Mode.
echo -e -n Then choose the $[0106]0 Easy2Boot 
echo option from the CSM Menu.
echo -e -n You can also run the $[0102]\\e2b\\RestoreE2B (run as admin).cmd 
echo file, which is
echo located on the Easy2Boot USB drive, to restore the original E2B partitions or
echo -n you can run 
echo -e -n $[0102]\\e2b\\SWITCH_E2B.exe
echo and select 'Restore E2B Partitions'.
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
