Add a new Sub-Menu folder

 
Note: All Menu folders must be directly under \_ISO and the folder name must not contain spaces.
 

An easy way to add a new Main Menu entry for a new folder, is to use the \_ISO\docs\E2B Utilities\Make SubMenu.cmd file - just run this or drag-and-drop your new \_ISO\MSDART folder onto it, to make a Main menu entry for it. Watch the YouTube video above or read the Blog for more details.
Otherwise, do it the harder way and follow the steps below.

 
Let us suppose we want a new menu folder called 'MSDaRT' for our MSDart ISOs (this could hold XP-based, Vista/7/8 based or UEFI .imgPTN files - see blog). We want this new menu to be listed in the Main menu as a SubMenu.
 
1. Make a new folder at \_ISO\MSDART and put an ISO in it (or whatever payload files you want). If you want to add payload files + .mnu files to it, make a \_ISO\MSDART\MNU folder (any name will do!) and put your .mnu files + payload files in there.
 
To add a new menu folder and a new Main Menu entry for that folder, simply use one of the existing menu folder .mnu files located in \_ISO\MAINMENU as a template.
 
2. Create a new text file \_ISO\MAINMENU\ZZSubMenu$MSDART.mnu from the WINPE example menu below (actually the name of your new .mnu file is not important, but it's name will determine the order it appears in the Main menu - so to have it appear before the other menu entries call it $$ZZSubMenuMSDART.mnu - to have it appear last, call it ZZZZSubMenuMSDART.mnu)
 
3. Edit the new .mnu file and change  'WINPE' to 'MSDART' and all the other text shown below in bold text. Choose a new hotkey letter (or delete the ^Ctrl+W text) and a new heading for the menu.
 
This is for non-GFXMenu E2B configurations because a hotkey does not work in GFXMenus.
 
iftitle [ls (bd)/_ISO/WINPE/ > (md)0x9F00+1 && checkrange 1:-1 read 0x13E0000 > nul && if "%GFX%"==""] ^Ctrl+W WINPE Menu        [Ctrl+W]\n Bootable WinPE's
#MFOLDER must be the full folder path starting with /
set MFOLDER=/_ISO/WINPE
#HDG is the top heading for the menu - \x20 is the code for a single SPACE character
set HDG=\x20WinPE Menu                                 \x20
(bd)/%grub%/SubMenu.g4b
boot
 
Look at \_ISO\MAINMENU\ZZSubMenuAll.mnu for other examples.
 
Ensure you save it as UTF-8 encoded if you use non-ANSII characters (use NotePad- File - Save As...).
 

If you want to make a Sub-Sub-Menu under this, e.g. if you want to have an MSDART5 menu in the MSDART menu, create a folder called \_ISO\MSDART_5, and create a ZZSubMenuMSDART_5.mnu file (any name will work!) which has been edited to use that new  \_ISO\MSDART_5 folder path. Then simply place the ZZSubMenuMSDART_5.mnu file in the \_ISO\MSDART folder. 

 

Add new Payload folders

(E2B v1.72+)

If you want to add more menu folders that work like the \_ISO\AUTO folder, then create a .mnu text file in the \_ISO\MAINMENU folder and use this format:

The folders do not have to be below /_ISO.

iftitle [if "%GFX%"=="" && ls (bd)/_ISO/LinuxISO/Ubuntu > (md)0x9F00+1 && checkrange 1:-1 read 0x13E0000 > nul] Ubuntu Menu\n Go to Ubuntu Menu
set LBACKMENU=(bd)/%grub%/menu.lst
set HDG=\x20 Ubuntu Menu
(bd)/%grub%/QAUTO.g4b .automenu /_ISO/LinuxISO/Ubuntu
debug 0
configfile (md)0x3000+0x50
 
iftitle [if "%GFX%"=="" && ls (bd)/_ISO/LinuxISO/Fedora > (md)0x9F00+1 && checkrange 1:-1 read 0x13E0000 > nul] Fedora Menu\n Go to Fedora Menu
set LBACKMENU=(bd)/%grub%/menu.lst
set HDG=\x20 Fedora Menu
(bd)/%grub%/QAUTO.g4b .automenu /_ISO/LinuxISO/Fedora
debug 0
configfile (md)0x3000+0x50
 
 
Note that QAUTO.g4b will enumerate ALL payload files in all folders below the specified folder, so you cannot have nested folders.
 

Enumerate only one folder

If you only want the menu to list payload files that are in one folder and not search below that folder, then set the LEVEL1 parameter - e.g.
 
Example Folder Structure:
/_ISO/Ubuntu                                       - use for main ISOs   
/_ISO/Ubuntu/Version13                      - for released v13 ISOs  
/_ISO/Ubuntu/Version13/TESTONLY - used for test builds of Ubuntu v13
 
 
iftitle [if "%GFX%"=="" && ls (bd)/_ISO/Ubuntu > (md)0x9F00+1 && checkrange 1:-1 read 0x13E0000 > nul] Main Ubuntu ISOs\n List Main Ubuntu ISO only
set LBACKMENU=(bd)/%grub%/menu.lst
set HDG=\x20 Ubuntu Menu
set LEVEL1=YES
(bd)/%grub%/QAUTO.g4b .automenu /_ISO/Ubuntu
set LEVEL1=
debug 0
configfile (md)0x3000+0x50
 
iftitle [if "%GFX%"=="" && ls (bd)/_ISO/Ubuntu/Version13 > (md)0x9F00+1 && checkrange 1:-1 read 0x13E0000 > nul] Ubuntu v13 Menu\n Go to Ubuntu v13 menu
set LBACKMENU=(bd)/%grub%/menu.lst
set HDG=\x20 Ubuntu v13 Menu
set LEVEL1=YES
(bd)/%grub%/QAUTO.g4b .automenu /_ISO/Ubuntu/Version13
set LEVEL1=
debug 0
configfile (md)0x3000+0x50
 
iftitle [if "%GFX%"=="" && ls (bd)/_ISO/Ubuntu/Version13/TESTONLY > (md)0x9F00+1 && checkrange 1:-1 read 0x13E0000 > nul] Ubuntu v143 Test ISOs\n Go to Ubuntu v13 TEST menu
set LBACKMENU=(bd)/%grub%/menu.lst
set HDG=\x20 Ubuntu v13 TEST Menu
set LEVEL1=YES
(bd)/%grub%/QAUTO.g4b .automenu /_ISO/Ubuntu/Version13/TESTONLY
set LEVEL1=
debug 0
configfile (md)0x3000+0x50
 

 

Add a sub-sub-me nu folder

The \_ISO\UTILITIES_MEMTEST folder is actually a sub-sub-menu folder for the Memory Test menu which can only be reached via the Utilities menu.

The \_ISO\UTILITIES\Utilities_MemTest.mnu file is used to add a menu item in the Utilities Menu which will take you to the UTILITIES_MEMTEST menu.

In the UTILITIES_MEMTEST folder there is a ZZBackTo_Utils.mnu file which will take you back to the Utilities Menu from the Memory Test menu.

 
New in v1.62: 
An easy way to add a new Main Menu entry for a folder is to use the \_ISO\docs\E2B Utilities\Make SubMenu.cmd file - just run this or drag-and-drop your new \_ISO\MSDART folder onto it, to make a Main menu entry for it. See the Blog for more details.

Otherwise, do it the hard way and follow the steps below.
 

If you want your own sub-sub-menu, then you will need to copy these two files and edit them as required.





More Info