Add Windows Install ISOs to the Main Menu

If you want to add a menu entry to install a specific Windows Vista\7\8\10 ISO directly from the Main menu (e.g. to save having to go to the Windows menu and then the Windows 7 menu), you can add a .mnu file to the  \_ISO\MAINMENU folder (or any other menu folder). Use \_ISO\docs\Sample mnu files\$$AddWin2Main.mnu as a template and change the Win7/Win8 entries or add to them as required.
 
# Use this for Vista/SVR2K8R2/Win7 ISOs
iftitle [if exist /_ISO/WINDOWS/Win7/Win7_32_SP1.iso] Install Win7 SP1 32-bit \n Install from the ISO
set MFOLDER=/_ISO/WINDOWS/WIN7
set ISO=Win7_32_SP1.iso
/%grub%/RunVista.g4b  %MFOLDER%
boot
 
# use this for Win8/8.1/SVR2012/WIN10 ISOs
iftitle [if exist /_ISO/WINDOWS/Win8/Win8.1_32.iso] Install Win8.1 32-bit \n Install from the ISO
set MFOLDER=/_ISO/WINDOWS/WIN8
set ISO=Win8.1_32.iso
/%grub%/RunWin8.g4b  %MFOLDER%
boot
 
You can add or delete entries or make small .mnu files for each Windows ISO.
 
(v1.61 and later) You can specify the full path to an XML file so that the user is not prompted to select one, by specifying an extra parameter on the command line - e.g. If you want to have a separate Windows 8.1 folder (\_ISO\FRED\Win81) then just change the folder name (the xml file is optional and should be in the \_ISO\FRED\WIN81 folder in this example):
 
iftitle [if exist /_ISO/FRED/WIN81/Win8.1_32.iso] Install Win8.1 32-bit \n Install from the ISO
# suppress return to Windows Install menu
set NOWMENU=1
set MFOLDER=/_ISO/FRED/WIN81
set ISO=Win8.1_32.iso
/%grub%/RunWin8.g4b  %MFOLDER%  myspecial.xml
boot
 
Note: v1.56+ versions - you need to specify the folder path of the ISO file using %MFOLDER%. If you have an existing .mnu file, please change them to use the new %MFOLDER% parameter. This allows you to use other folders besides \_ISO\WINDOWS\xxxx. Note: If you use a non-standard folder, you will also need to copy or add .xml and .key files from the \_ISO\WINDOWS\xxxx folders.
 
Menu entries will be arranged alphabetically according to their filenames, so change the name to ZZZZZZ.mnu if you want it added last in the Main menu. You can also add a hotkey for each one by adding it to the title line.
 
$$AddWin2Main.mnu also contains entries for XP install ISO menu entries (note that menu entries for each individual XP ISOs are not supported) and the XP PE install menu entry. You can delete any menu entries that you don't want.
 
To prevent a Windows XP/Vista/7/8 sub-sub-menu from loading the Windows Install sub-menu, use this setting in your MyE2B.cfg file or the .mnu file:
 
# 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

 

Please Note: There was a bad example in $$AddWin2Main.mnu in E2B v1.61-1.80:  For Vista\Win7 XML, you need to specify the full path - e.g. set XML=%MFOLDER%/Sample.xml, but for Win8/10 you must only specify the name of the XML file - e.g. set XML=Sample.xml.

Examples with XML file specified (v1.61+)

 
iftitle [if exist /_ISO/WINDOWS/Win7/Windows_7.1_EN-US_x86.ISO] Install Win7 32-bit \n Install from the ISO
set MFOLDER=/_ISO/WINDOWS/WIN7
set ISO=Windows_7_x86.ISO
set XML=
# Specify full path of XML file (e.g. %MFOLDER%/Win8\ has\ spaces\ in\ name.xml)
# OR to choose XML or Product Key, comment out next line
set XML=%MFOLDER%/Sample.xml
set NOWMENU=1
/%grub%/RunVista.g4b  %MFOLDER% %XML%
boot
 
 
iftitle [if exist /_ISO/WINDOWS/Win8/Windows_8.1_EN-US_x86.ISO] Install Win8.1 32-bit \n Install from the ISO
set MFOLDER=/_ISO/WINDOWS/WIN8
set ISO=Windows_8.1_EN-US_x86.ISO
set XML=
# Specify XML file in MFOLDER folder (e.g. Win8\ has\ spaces\ in\ name.xml)
# OR to choose XML or Product Key, comment out next line
set XML=Sample.xml
set NOWMENU=1
/%grub%/RunWin8.g4b  %MFOLDER% %XML%
boot
 
 
 
 
 
You can also use the XP_Inst_from_MainMenu.mnu to add specific XP ISO files to the Main menu.
 
title Install XP Pro 32-bit - Step 1\n Remember to select an AHCI driver (if required) \n AND FiraDisk AND WinVBlock drivers (using F6)!\n You must reboot to Easy2Boot again and run STEP 2 afterwards.
set XPISO=MyXPPro.iso
set MFOLDER=/_ISO/WINDOWS/XP
/%grub%/XPStep1.g4b
boot
 
title Install XP Pro 32-bit - Step 2 (512MB+ systems)\n 2nd phase of setup (most reliable).\n This will complete the install and reboot from the hard disk.\n It requires at least 512MB of RAM to hold the ISO file.
set XPISO=MyXPPro.iso
set MFOLDER=/_ISO/WINDOWS/XP
/%grub%/XPStep2.g4b
boot
 
title Install XP Pro 32-bit - Step 2 (Low RAM systems)\n Faster - use this if not enough system memory (<512MB). \n Direct ISO map for WinVBlock. Does not work on all\n systems, e.g. some Atom CPU based systems.
set XPISO=MyXPPro.iso
set MFOLDER=/_ISO/WINDOWS/XP
/%grub%/XPStep2LowRam.g4b
boot
 
 

Custom installs

If you want to have individual menu entries for a Vista/7/SVR2K8R2/Win8/SVR2012 Install ISO using a predefined XML file or specific Product Key using your own code, look at the Win_Vista_7_2K8R2_Direct.mnu and Win_Win8_2012_Direct.mnu files in the \_ISO\docs\Sample mnu Files folder for examples. 

Note that Win8/2012 installs nearly always require a product key (even those that don't normally ask for one!), unless the ISO contents have been modified and a custom EI.CFG file has been added.