Sample_MyE2B.cfg

Check the \_ISO folder for the latest version of this file as it may be updated in later versions of E2B.
Note: Line numbers have been added for clarity, they are not present in the file itself.
 
  1. !BAT
  2. # IMPORTANT: This file MUST begin with !BAT
  3.  
  4. # PLEASE READ www.easy2boot.com for full details.
  5. #
  6. #   This file can be copied to \_ISO\MyE2B.cfg
  7. #   Edit it to change the language, Main heading, Footer, startup behaviour, etc.
  8. #
  9. # HELP USING THIS .CFG FILE
  10. #   # this single # symbol comments out a line - these lines contain help or information
  11. #   ### three # symbols means you can uncomment and use these lines - they contain example grub4dos commands which can be used to change the E2B settings
  12. #
  13. #   e.g.
  14. #       #  Auto menu      - this line should not be changed - do not delete the # symbol
  15. #       ###set DEFM_MNU=0 - this line can be uncommented by deleting the ### symbols and then changed by the user if required
  16.  
  17. # If you wish, you can delete any whole line beginning with # or ### to make the file smaller and more legible
  18.  
  19. #       SUB-MENU HEADINGS are in the STRINGS.TXT language files (for different languages)
  20. #       Menu entries and E2B phrases are also in each STRINGS.TXT file
  21. #       DO NOT EDIT THE \_ISO\e2b\grub\ENG\STRINGS.TXT file - copy it to \_ISO\e2b\grub\FRED\STRINGS.TXT and use 'set LANG=FRED' in this file to use it
  22. #       WARNING: If you have a \_ISO\STRINGS.txt file, this will over-ride any language setting
  23.  
  24. #  ------ USE ALTERNATE CFG FILE FOR 800x600 ----
  25. # if you use 1024x768 (GMODE=1024), you can use the two lines below to use an alternate 800x600 MyE2B800.cfg config file if 1024x768 is not supported by the computer
  26. ###debug 1 ;; vbeprobe > (md)0x220+5 ;; debug 0
  27. ###cat --locate=1024x768x24 (md)0x220+5 > nul || /_ISO/MyE2B800.cfg && goto :EOF
  28.  
  29. #  ----- GRAPHICS MODE AND WALLPAPER -----
  30. # set graphics mode - use 640, or 800 or 1024 - or specify full mode - e.g. 800 600 24
  31. # 640 and 800 is supported by the default background bitmap  - you can define exact size - e.g. GMODE=800 600  or  GMODE=800 -1 24:32 (800 by *anything* with 24 or 32-bit colour)
  32. set GMODE=800
  33.  
  34. # set the WALLPAPER BACKGROUND
  35. # The size of your background bmp must match the GMODE setting (e.g. use 1024x768 bitmap and set GMODE=1024)
  36. # Change the path and filename below if you wish - .bmp and .bmp.gz supported (.bmp can be compressed using LZMA_Encode). grub4dos 0.4.6a also supports .jpg files.
  37. set MYWBMP=/_ISO/mybackground.bmp
  38.  
  39. # If GMODE is set to a number (e.g. 800 or 1024 for graphics mode), then we can fill the screen with a single colour instead of using a bitmap
  40. # This is quicker than loading a bitmap file - the colour value must begin with 0x (zero x) and be in RGB format 0xrrggbb
  41. ###set MYWBMP=0xff0033
  42.  
  43. #    --------- MAIN MENU HEADING -----
  44. # start the heading with \x20 if you need leading spaces.
  45. # special variables can be used. %B64% is CPU type + Memory size - e.g. [486MB 64-bit];  %VER% is E2B version - e.g. 1.65. Use %@date% or %day%-%month%-%year% for date
  46.  
  47. set HEADING=\x20 EASY2BOOT - MAIN MENU  (%VER%) %B64%
  48.  
  49. # Heading position is set by HEADPOS + HPAD - all menu headings are affected (must be 4 decimal numbers)
  50. # set start position of HEADING using HEADPOS=YYXX  - default position = HEADPOS=0000 = top-left, 0200 = 3rd line down - should always end in 00 if you use CENTREHD=1
  51. set HEADPOS=0000
  52. # HPAD sets space padding (alignment) before all menu headings - NORMALLY, NO NEED TO CHANGE THIS!
  53. # this is usually automatically calculated by E2B from the rstart value (\x20 is same as one space character)
  54. ###set HPAD=\x20              \x20
  55.  
  56. # ----- CENTRE ALL MENU HEADINGS -----
  57. # CENTREHD=xx causes the menu headings to be centred inside xx characters - e.g. if CENTREHD=60 then middle will be at (HPAD)+30
  58. # If CENTREHD=1 then the menuw value (see below) is used to calculate the centre position - Use CENTREHD=1 for normal auto-centred headings
  59. # To centre all headings on an 800 pixel screen width (not the menu width) use  CENTREHD=98, HEADPOS=0100, HPAD=\x20\x20
  60. ### set CENTREHD=1
  61.  
  62. # ----- HEADING COLOUR -------
  63. # HCOLOUR sets the colour of the HEADING text 
  64. # HCOLOUR=ABCD specifies the text colour  [BLINK|BRIGHT_F|BACKGROUND|FOREGROUND]
  65. # A=0-1  1=BLINK text (does not work under VM or in graphics mode) - i.e. only works if GFX=none is used.
  66. # B=0-1  1=BRIGHT_F sets bright value for foreground text
  67. # C=0-7   =BACKGROUND colour - transparent if graphics mode so has no effect!
  68. # D=0-7   =FOREGROUND menu text colour
  69. # Colours parameters are: 0=black/grey 1=blue, 2=green, 3=cyan, 4=red, 5=pink, 6=yellow/brown, 7=grey/white.
  70. # e.g. 0133 is non-blinking bright cyan text (on a dark cyan background if not in graphics mode) - if a wallpaper is used (graphics mode) it becomes _1_3 = bright-cyan, because background value is ignored.
  71. set HCOLOUR=0103
  72.  
  73. # --- FOOTER HELP TEXT TO DISPLAY AT BOTTOM OF SCREEN ---
  74. # HBTM = Bottom HELPTEXT POSITION YYXX - for 640x480 use HBTM=2802 - for 800x600 use HBTM=3502  (Note: HPAD is NOT used to pad out the HELPTEXT). For GFX=none use HBTM=2400 or set >24 for off-screen.
  75. set HBTM=3502
  76.  
  77. # Colour of HELPTEXT (see HCOLOUR above for meaning)
  78. set FCOLOUR=0103
  79.  
  80. # use \x20 for no text at the bottom of the menus - e.g. set HELPTEXT=\x20   (%^LANG% will display the current language); use %@date% or %day%-%month%-%year% for date
  81. set HELPTEXT=HDD0 [F7]   Back [F8]   Reboot [F9]   Power Off [F10]  (%^LANG%)
  82.  
  83.  
  84. # -------- MENU COLOURS -------
  85. # Colour pairs are Text/Background - i.e cyan/blue = cyan text on blue background
  86. # Use black if a transparent background is required for menu highlight background - e.g. highlight=red/black
  87. # Valid colours are: black, blue, green, cyan, red, magenta, brown, light-gray, dark-gray, light-blue, light-green, light-cyan, light-red, light-magenta, yellow and white.
  88. #  normal    = normal menu text
  89. #  highlight = highlighted menu text when a menu entry is selected
  90. # helptext = the colour of the title help text shown just below the menu box
  91. #  standard  = the console background and text colours (e.g. when listing files)
  92. #  border    = the colour of the border of the menu box
  93. # For GFX Boot menu, only color standard=xxxx/yyyy is valid (suggest use black background - e.g. color standard=cyan/black)
  94. color normal=light-cyan/black highlight=red/black helptext=yellow/black standard=light-cyan/black border=light-gray/black
  95.  
  96. # -------- 24-BIT MENU COLOURS -------
  97. # You can instead set a 24-bit full colour value using 0xRRGGBB, the value must be larger than 0xFF to work correctly however
  98. # the background colour will be set to black (transparent in graphics mode menus) if number is >0xFF
  99. # See http://www.rapidtables.com/web/color/RGB_Color.htm
  100. # Red=0xFF0000   Green=0x00FF00   Blue=0x0100FF  (must be larger than FF so use 01 for red!), Yellow=0xFFFF00, White=0xffffff, Brown=0x994c00
  101. # Examples:
  102. ### color normal=0x777700
  103. ### color highlight=yellow/light-gray ;; # use for yellow text on light-grey background - limited colours for highlight colour   
  104. # OR...
  105. ### color highlight=0xFFFF00 ;; # yellow + background will be transparent
  106. ### color highlight=0x0022222200FFFF00  ;; # yellow + background will be 222222 (v. dark grey/black)
  107. ### color helptext=0xFFFFFF
  108. ### color standard=0x994c00
  109. ### color border=0xFF0000
  110.  
  111. # If you define a highlight background colour (not transparent), make the highlight bar only as long as the text
  112. # set full length highlight bar for selected menu item (--highlight-short or --highlight-full)
  113. ### setmenu --highlight-full > nul
  114. ### setmenu --highlight-short > nul
  115.  
  116. # ----- MENU POSITION ---
  117. # n = unchanged  (if wdspace or lnspace is not n then screen is cleared) - default for wdspace and lnspace is 0 or n
  118. # if using GFX=none for text mode and CENTREHD=1, set menuw=78 and rstart=2 to get centred menu headings
  119. # Note: The grub4dos menu system allows 4 lines of menu help text + 1 line for it's own messages (e.g. default timeout)
  120. # Therefore you need to leave space for 5 free lines of text under the menu (e.g. if tophelp=26, then lines 26,27,28,29 & 30 are used for help text)
  121. # 800x600 = 100 characters (0-99) by 37 lines (0-36),  1024x768 = 128 characters (0-127) by 48 lines (0-47)
  122. # You can increase line separation using (for example) lnspace=8. Note thst you will need to reduce topstart and noitems too
  123. set wdspace=n
  124. set lnspace=n
  125. set bdwidth=1
  126. set rstart=3
  127. set menuw=62
  128. set topstart=2
  129. set noitems=24
  130. # use tophelp = topstart + noitems  for menu help text just under menu box - for 640x480  noitems=18 tophelp=20 - for 800x600  noitems=24 tophelp=26
  131. #set /a tophelp=%topstart% + %noitems% > nul
  132. set tophelp=26
  133.  
  134.  
  135. # ---- SHOW FILE EXTENSIONS IN MENU ----
  136. # Don't show file extensions in menu
  137. set EXTOFF=1
  138. # Show file extensions in menu
  139. ### set EXTOFF=
  140.  
  141. # --- NO USER PROMPT FOR .imgPTN FILES -----
  142. # .imgPTN AUTO-RUN - if any .imgPTNxxx family is selected, switch partitions and display CSM menu with no user prompt
  143. ### set AUTOCSM=1
  144.  
  145. # --- BEEP INTERNAL BOARD SPEAKER WHEN MAIN MENU LOADS ----
  146. # Beep when Main Menu loads, values 1, 2 or 3 only (only works if internal speaker fitted to system)
  147. ### set beep=3
  148.  
  149. # Suppress the QRUN.g4b 'best file extension suggestions' and advice messages + no pause in isoboot
  150. ### set NOSUG=1
  151.  
  152. # NOWINXP removes the 'Boot from HDD0', 'List PCI devices' and the 32/64bit menu separator from the Windows Menu
  153. # useful to keep the menu tidy if you do not have WinXP ISOs
  154. ### set NOWINXP=1
  155.  
  156.  
  157. # --------------------------------------- ADVANCED MENU SETTINGS ------------------------------------------------------------------------------
  158. # DO NOT DELETE THE LINE ABOVE! - Settings below this next line will be preserved when using the E2B_Editor.exe
  159.  
  160. # Tip: To permanently remove the grub4dos boot text at top of screen and grub4dos startup messages, run \_ISO\docs\patchme from the grub4dos console
  161. # See http://www.easy2boot.com/configuring-e2b/mye2b-cfg/ - patching grub4dos
  162.  
  163. # hstart = x position of menu help text (default = rstart-1), min = 1, 0=use menu width and menu start
  164. # hwidth = width of menu help text (default = menuw+2), 0=use whole width - 2 x hstart
  165. ### set hwidth=70 && set hstart=6
  166.  
  167. # Write text to the menu (grub4dos 0.4.6a only) - --string=x=y=colour="text"
  168. ###setmenu --string=69=18=0xFF00FF="Hello"
  169.  
  170. # 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.
  171. ### if exist /_ISO/docs/PatchMyMBR call /_ISO/docs/PatchMyMBR > nul
  172. # 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)
  173. ### cat --locate=\x02 --replace=\x00 --skip=0x2073 --length=1 /grldr > nul
  174. ### if exist /%grub%/grldr_046 cat --locate=\x02 --replace=\x00 --skip=0x2073 --length=1 /%grub%/grldr_046 > nul
  175.  
  176.  
  177. # 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.
  178. # No timeout - auto-suggest will always wait for the user to press a key
  179. ###set TSUG=0
  180. # Change auto-suggest timeout (1-989)  - e.g. 10 = wait 10 seconds
  181. ###set TSUG=10
  182. # use default timeout of 3 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
  183. ###set TSUG=993
  184. # Always wait for user - if user presses ENTER only, the suggested file extension will be used instead of the current file extension
  185. ###set TSUG=990
  186.  
  187. # --- GRUB4DOS 0.4.6 + USB DRIVERS ---
  188. # The file \grldr is the grub4dos code that is loaded on booting. If you want to use v0.4.5c on boot-up then overwrite it using the file \_ISO\e2b\grub\grldr_045
  189. # Grub4Dos 0.4.6 has built in USB drivers and so it can bypass the BIOS USB code - useful if you have buggy BIOSes
  190. # Tip: Hold down the SHIFT key just before E2B starts to boot and E2B will load the grub4dos fast USB rd/wr driver automatically
  191. # To ALWAYS use grub4dos 0.4.6 and initialise the USB 2 drivers on start-up use GRUB_USB=Y  (not recommended - can cause problems)
  192. ### set GRUB_USB=Y
  193.  
  194. # To ALWAYS switch to version 0.4.5 and use \_ISO\e2b\grub\grldr_045 (not recommended as some functions may not work)
  195. ###set GRUB_USB=045
  196.  
  197. # To prevent E2B refusing to boot if partition 4 (hd0,3) is present, uncomment the two ### lines below - 
  198. # WARNING: THIS WILL ERASE PTN #4 (hd0,3) ON THE E2B DRIVE EACH TIME YOU BOOT! ONLY USE WITH USB DRIVES!
  199. ###if exist (hd0,0)/_ISO/MyE2B.cfg partnew (hd0,3) 0 0 0 
  200. ###if exist (hd0,1)/_ISO/MyE2B.cfg partnew (hd0,3) 0 0 0 
  201. # To always erase ptn 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!
  202. # WARNING: This will delete PTN #3 (hd0,2) on the E2B DRIVE
  203. ###if exist (hd0,0)/_ISO/MyE2B.cfg partnew (hd0,2) 0 0 0 
  204. ###if exist (hd0,1)/_ISO/MyE2B.cfg partnew (hd0,2) 0 0 0 
  205.  
  206. # ----- PROGRESS MESSAGE CONTROL ----
  207. # 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!)
  208. # call Fn.70 3
  209. # Set cursor outside of the screen so no text or cursor is seen for a while (cursor set to column 0  row 128!)
  210. # call Fn.5 0 128
  211. # 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!
  212. # call Fn.70 0 ;; clear
  213. # If you want to get rid of any earlier screen text use clear
  214. # clear
  215.  
  216. # Examples (use ONE of the following lines by removing the ### characters)
  217. # 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)
  218. ###call Fn.70 0 ;; clear ;; call Fn.5 0 128 ;; set redirp=> nul ;; set redir=> nul
  219.  
  220. # Use this line to display the background image as early as possible with a few progress messages
  221. ###call Fn.70 3 ;; set redir=> nul 
  222.  
  223. # Use this line to display the background image as early as possible with no startup messages except an initial quick 'Please wait...' message
  224. ###call Fn.70 3 ;; set redir=> nul ;; set redirp=> nul ;; debug -1 ;; pause --wait=1 Please wait... ;; debug 0
  225.  
  226.  
  227. # ---- E2B STARTUP AND OTHER MESSAGES ----
  228. # SUPPRESS STARTUP FILE ENUMERATION INFORMATIONAL MESSAGES from AUTOMN.g4b, etc.
  229. ###set redir=> nul
  230.  
  231. # SUPPRESS OTHER (important) E2B MENU.LST PROGRESS MESSAGES (NOT recommended!)
  232. ###set redirp=> nul
  233.  
  234. # Note: redir and redirp may affect the text displayed when a .imgPTN file is selected. Read more at http://www.easy2boot.com/configuring-e2b/mye2b-cfg/
  235.  
  236. # Display ASCII Easy2Boot text for 1 second (http://www.askapache.com/online-tools/figlet-ascii/ or http://www.ascii-art-generator.org/ - use 99 as width)
  237. ###graphicsmode -1 800 > nul ;; cat /%grub%/ASCII_E2B.txt && pause --wait=1 > nul
  238.  
  239. # ---- MENU NUMBERING ----
  240. # 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.
  241. # Auto-numbering is enabled by default.  AUTONUM=CCMM where CC is the marker/arrow character (byte) and MM is bit0 = numbering and bit1 = space after number, 
  242. # Use AUTONUM=0x0000 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
  243. # e.g. 0x2d00=►menutext, 0x2d01=►nn-menutext, 0x2d02=►   menutext (has three spaces), 0x2d03=same as 0x2d01   (where nn=two-characters for menu numbering 0-9/10-99)
  244. ###set AUTONUM=0x0000
  245.  
  246. # The default highlighted menu marker is a solid arrow symbol ► - it can be removed or changed  (0x16 for →, 0x07 for a dot or 0 for no symbol) grub4dos 2014-08 or later.
  247. ### write 0x8308 0 > nul
  248.  
  249. # ----------- DISABLE AUTOMENU feature -----------------
  250. # 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
  251. # 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)
  252. ###set AUTOMENU=OFF
  253.  
  254. # ---- GFX menu support ----
  255. #  If you really want to use a gfxmenu or @DED-LEGO@ or GFX-RIPPER then specify the 'message' file here - http://www.easy2boot.com/configuring-e2b/gfx-menu-support/
  256. #  There are many gfxmenu limitations (on error goes into text mode, no timeout or default option, number of ISOs cannot be displayed, etc. etc.)
  257. # Tip: grub4dos 0.4.6a and E2B now supports large fonts - see FONTH below
  258. # 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)
  259. set GFX=
  260. ###set GFX=message
  261. ###set GFX=docs/Templates/GFXMenu/message
  262.  
  263. # ---- TEXT MODE (no fancy wallpaper and no unicode font used - quick to load) ---
  264. # NO GRAPHICS MODE OR WALLPAPER or GFXMenu
  265. # Text-mode menu (no wallpaper) - suppresses graphics mode (must use 'GFX=none')
  266. # Try these settings if using text mode - set HBTM=2301 set HCOLOUR=0104 set FCOLOUR=0104
  267. # 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
  268. # See "\_ISO\docs\MyThemes\TextMinimal.cfg" for an example MyE2B.cfg file.
  269. ###set GFX=none
  270.  
  271. # ---- KEYBOARD TYPE -----
  272. #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
  273. #Note: Passwords may not work properly if the keyboard scan code mapping is not correct! Default = US keyboard
  274. ###set KBD=KBD_AZERTY.g4b
  275. ###set KBD=KBD_FRENCH.g4b
  276. ###set KBD=KBD_GERMAN.g4b
  277. ###set KBD=KBD_ITALIANO.g4b
  278. ###set KBD=KBD_JAPAN_106.g4b
  279. ###set KBD=KBD_QWERTY_UK.g4b
  280. ###set KBD=KBD_QWERTZ.g4b
  281. ###set KBD=KBD_SPANISH.G4B
  282. ###set KBD=KBD_QWERTY_UK.g4b
  283.  
  284. # set the keyboard type now
  285. # 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)
  286. ###if not "%KBD%"=="" call /%grub%/%KBD% %redirp%
  287.  
  288.  
  289. # ---- LANGUAGE SUPPORT ----
  290. # To change language from ENGlish, look for supported language folders in the \_ISO\e2b\grub\xxx folders
  291. ###if "%LANG%"=="" set LANG=ARABIC && set RTL=1 && set AUTONUM=0 && write 0x8308 0 > nul
  292. ###if "%LANG%"=="" set LANG=CZECH
  293. ###if "%LANG%"=="" set LANG=DUTCH
  294. ###if "%LANG%"=="" set LANG=ENG
  295. ###if "%LANG%"=="" set LANG=FRENCH
  296. ###if "%LANG%"=="" set LANG=GERMAN
  297. ###if "%LANG%"=="" set LANG=GERMAN_ALT
  298. ###if "%LANG%"=="" set LANG=GREEK
  299. ###if "%LANG%"=="" set LANG=ITALIAN
  300. ###if "%LANG%"=="" set LANG=POLISH
  301. ###if "%LANG%"=="" set LANG=PORTU_BRAZIL
  302. ###if "%LANG%"=="" set LANG=ROMANIAN
  303. ###if "%LANG%"=="" set LANG=RUSSIAN
  304. ###if "%LANG%"=="" set LANG=SIMP_CHINESE
  305. ###if "%LANG%"=="" set LANG=SPANISH
  306. ###if "%LANG%"=="" set LANG=SWEDISH
  307. ###if "%LANG%"=="" set LANG=TRAD_CHINESE
  308. ###if "%LANG%"=="" set LANG=UKRAINIAN
  309.  
  310. # use RTL for RIGHT-TO-LEFT LANGUAGES ----
  311. # e.g Arabic. Uncomment first line below to right-align menu entries. RTL=1 means use menuw value - or set RTL=  - e.g. 'set RTL=58' to adjust position of menu headings
  312. ###set RTL=1
  313. # For RTL support, we must use 'set AUTONUM=0' to turn off menu numbers and 'write 0x8308 0 > nul' to turn off menu marker arrow
  314. ###set AUTONUM=0
  315. ###write 0x8308 0 > nul
  316.  
  317. # User Language Selection example code - prompt user before Main Menu is displayed - see \_ISO\e2b\grub folders for all available languages
  318. # Uncomment all the following lines (remove ###) to ask user to choose a different language (edit as required)
  319. ###if not "%DONEMENU%"=="" goto :skplang
  320. ###echo CHOOSE A LANGUAGE
  321. ###echo
  322. ###echo C  = Chinese (Simplified)
  323. ###echo TC = Chinese (Traditional)
  324. ###echo E  = English
  325. ###echo G  = German
  326. ###echo S  = Spanish
  327. ###echo
  328. ###set /p ask=Which language : 
  329. ###if /i "%ask%"=="C" set LANG=SIMP_CHINESE
  330. ###if /i "%ask%"=="TC" set LANG=TRAD_CHINESE
  331. ###if /i "%ask%"=="G" set LANG=GERMAN
  332. ###if /i "%ask%"=="S" set LANG=SPANISH
  333. ###if /i "%ask%"=="E" set LANG=ENG
  334. ###:skplang
  335.  
  336.  
  337. # ---- IF YOU ARE USING A REMOVABLE USB FLASH DRIVE FOr E2B (or are not going to use a 'Helper' USB flash drive) ---
  338. # no need to search for WINHELPER.USB so set NOHELPER=1 (or use if E2B hangs at 'Looking for WINHELPER.USB...' )
  339. # speeds up booting to Main Menu slightly
  340. ###set NOHELPER=1
  341.  
  342.  
  343. #   ---- PASSWORD PROTECTION -----
  344. # E2B default menu edit password is easy2boot
  345. # The line below will set a password of 'easy2boot' to stop users editing the menus accidentally (encrypted)
  346. # You can use an encrypted md5 value or a plain text value (see www.easy2boot.com - Configure E2B - Protection and Security for md5 calculation details)
  347. # If you want to edit the menus, press p and then enter the password (or you can use an unencrypted password like this: 'set pwd=fred')
  348. # Does not work if using GFX Menu
  349. # Set encrypted password of easy2boot
  350. ###set pwd=--md5 $1$1$okAQ3AJUdhqf3TVrwKvJP1
  351. # OR set plain text password of fred
  352. ###set pwd=fred
  353.  
  354. # Any payload file extensions ending in "pwd", e.g. Ubuntu.isopwd, will ask for a password before they will run
  355. # If menupwd is defined, then that will be the required password for the payload file
  356. # If menupwd is not set then the pwd (E2B menu edit password) will be used (if set)
  357. # e.g. if file = Ubuntu14.1.isopwd or Win7Install.imgPTNpwd  and menupwd=fred then you must enter fred before the payload will run
  358. #      if both menupwd and pwd are not set, then no password will be prompted for
  359. # Can use md5 encrypted password or plain text...
  360. ### set menupwd=--md5 $1$fzr3$gtBm4hqXA1CohTSpMsuxG1
  361. ### set menupwd=fred
  362.  
  363. # --- MASTER PASSWORD ---
  364. # To prompt user for password or PIN code, we must set up graphics, etc. now
  365. # GMODE was already set in the lines above - run graphicsmode before splashimage
  366. ###graphicsmode -1 %GMODE% > nul
  367. # If you want to display a different background bitmap just for the Master password user input (see below), use these 3 lines below
  368. ###call Fn.70 3
  369. ###splashimage /_ISO/docs/Templates/Aliums/Aliums.bmp.gz > nul
  370. ###clear
  371. # for a better method of password input, see www.easy2boot.com/configuring-e2b/protection-and-security/
  372. # the next line changes the font immediately but can cause a delay whilst it loads - ensure in graphics mode
  373. ###font ()/%grub%/unifont.hex.gz
  374. # You should have already set the keyboard type previously (e.g. QWERTZ)
  375. :mpwd
  376. # If you want to set a Master password for Easy2Boot to prevent anyone from using it on first boot
  377. # (e.g. 'fred') uncomment and edit the lines below (you can use password --md5 xxxxxxxx format if you wish)
  378. ###if exist DONEMENU goto :pok
  379. ###clear && echo && echo ENTER E2B MASTER PASSWORD
  380. ###debug 0
  381. ###password fred && goto :pok
  382. ###echo && set /p:2 ask=WRONG PASSWORD!
  383. ###goto :mpwd
  384. :pok
  385. ###if not exist DONEMENU echo
  386.  
  387. # To reboot if the password is wrong, replace the line   goto :mpwd    with the grub4dos command     reboot
  388.  
  389. # This will cause MYWBMP background to be always loaded before displaying the Main Menu - only needed if you enable FASTLOAD *AND* use splashimage for Master password as above
  390. ###set DONEMENU=
  391.  
  392. # --- MONTHLY PIN CODE ---
  393. # The user must enter the "4 digit PIN code of the month"
  394. # Windows PIN CALCULATOR app is available on request
  395. # VARIABLES BELOW CAN AFFECT ACTIONS OF TP.g4b
  396. # SEED - 4 digits - this is your special SEED number - default is 1985
  397. # set number of allowed attempts - default is very large!
  398. #
  399. # SPECIAL OPTIONS: TESTPIN and PINRETURN
  400. # 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)
  401. # 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.
  402. # Typical use: Uncomment only the 6 ### lines, set ATTEMPTS and SEED. E2B Version line can be altered for any special message you like. 
  403. # Do not uncomment ##SS# lines unless needed (see http://www.easy2boot.com/configuring-e2b/protection-and-security/)
  404. ###if not exist /%grub%/TP.g4b halt
  405. ###if exist DONEMENU goto :TPfin
  406. ###set SEED=1985
  407. ###set ATTEMPTS=3
  408. ##SS#set TESTPIN=8684
  409. ##SS#set PINRETURN=1
  410. ###echo E2B VERSION %VER% 
  411. ###call /%grub%/TP.g4b
  412. ##SS#if not "%PINRETURN%"=="OK" reboot
  413. ##SS#if "%PINRETURN%"=="OK" clear
  414. :TPfin
  415.  
  416. # --- ENCRYPT FILES ---
  417. #Tip: For even better security, use 7Zip to compress this MyE2B.cfg file to GZip format or use lzma.exe (See www.easy2boot.com - Configure E2B - Protection and Security)
  418. #     \_ISO\docs\E2B Utilities\LZMA has useful batch files to encrypt files
  419. #     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.
  420.  
  421. # ---- SET AN EXPIRY DATE - EXAMPLES -----
  422. # Change the 20160320 date below to alter the expiry date and change the message - you can use reboot instead of halt
  423. ###if 20160320<=%@date:~0,4%%%@date:~5,2%%%@date:~8,2% pause --wait=3 THIS SOFTWARE HAS EXPIRED! && halt
  424.  
  425. # Use this code to only allow use on weekdays
  426. ###call /%grub%/dow.g4b %@date:~0,4% %@date:~5,2% %@date:~8,2% 
  427. ###if "%dow%"=="0" pause It's Sunday! && halt
  428. ###if "%dow%"=="6" pause It's Saturday! && halt
  429. ###set dow=
  430.  
  431. # See http://www.rmprepusb.com/tutorials/grubutils#TOC-Another-Batch-file-example---use-checkdate.g4b-to-check-an-Expiry-Date
  432. # set 14 day expiry date from 28th March 2016
  433. ###call /_ISO/e2b/grub/checkdate.g4b 2016 03 28 14 SILENT
  434. ###if not "%CHECKDAT%"=="OK" echo E2B EXPIRED! && halt
  435. ###set CHECKDAT=
  436.  
  437. # --- CLONE PROTECTION (lock to this drive only) ---
  438. # This code gets the exact size of the E2B USB drive to prevent it being copied and run from another USB drive.
  439. # get number of sectors using INT 13h AH=48 into memory at DS:SI+10h  - edx=80h is hard disk 0, 81h would be hard disk 1
  440. # Change number 12345678 to match the size returned by your drive. Change halt to reboot if desired. Delete pause line if not required.
  441. ###debug 1 ;; echo xxxxxxxxxxxxxxxxxxxxxxxxx > (md)0x300+1 ;; write 0x60000 0x42 > nul ;; write 0x60010 0 > nul
  442. ###/%grub%/bios int=0x13 eax=0x4800 edx=0x80 ds=0x6000 esi=0x0 > nul ;; read 0x60010 > nul ;; set /a END=%@retval%-1 > nul
  443. ###if not %END%==12345678 pause THIS DRIVE ENDS AT SECTOR %END%
  444. ###if not %END%==12345678 halt
  445. ###set END=
  446.  
  447.  
  448. # --- MENU CONFIGURATION ----
  449.  
  450. # sets the Default menu entry that will be highlighted when the WINDOWS INSTALL MENU is displayed
  451. ###set DEFM_WIN=1
  452.  
  453. # If DEFMENU=0 then the '0 Set default menu entry and timeout' menu item in the Main menu will not be listed
  454. ###set DEFMENU=0
  455.  
  456. # WINCOUNT variable will cause all the \_ISO\Windows ISOs to always be enumerated on a FASTLOAD boot
  457. ###set WINCOUNT=1
  458.  
  459. # If NOF7HD is set then the 'Boot from HDD0 F7' menu entry is suppressed in all menus
  460. ###set NOF7HD=1
  461.  
  462. # If the NOF8B is set then the Windows menu will not display 'F8 Back to Main Menu' 
  463. ###set NOF8B=1
  464.  
  465. # if NOF8MAIN is set then no F8 Main menu entry will be available
  466. ###set NOF8MAIN=1
  467.  
  468. # If NOF9R is set then the 'F9 Reboot menu' item will not be listed in any menu (remember to change HELPTEXT too)
  469. ###set NOF9R=1
  470.  
  471. # If NOF10H is set then the 'F10 Power Off/Halt' menu item will not be listed in any menu (remember to change HELPTEXT too)
  472. ###set NOF10H=1
  473.  
  474. # Don't display the F1 HELP entry in the Main menu
  475. ###set NOF1=1
  476.  
  477. # NO FASTLOAD MENU - If you don't want the user to see the Main Menu entry to enable or disable FASTLOAD
  478. ###set NOFLDMNU=1
  479.  
  480. # NOWMENU causes a Windows Install sub-sub menu to return back to the Main menu rather than return to the Windows Install menu
  481. ###set NOWMENU=1
  482.  
  483. # NOWINMAIN cause the Windows Main Menu entry to be suppressed (even if there are \_ISO\WINDOWS\xxx\yyy.ISO files present
  484. ###set NOWINMAIN=1
  485.  
  486. # SET DEFAULT MAINMENU ITEM AND TIMEOUT
  487. # Information: Create an \_ISO\menu_defaults.txt file
  488. # Set the default entry and timeout in the menu_defaults.txt file (debug 0 prevents menu item number at top right from being displayed) 
  489. # DO NOT UNCOMMENT THE LINES BELOW! They should not be set in this file!
  490. # 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
  491. #   default 0
  492. #   timeout -1
  493. #   debug 0
  494. # This will fix which initial main menu default entry will be highlighted and the timeout in seconds.
  495. # You must also set DEFMENU=0 to suppress the 'Set default menu entry and timeout' menu entry
  496.  
  497. # --- CHARACTER SET FONTS ----
  498.  
  499. # 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
  500. # Special non-ANSI characters are not included, so only suitable for English language really
  501. ###set FONT=()/_ISO/docs/Fonts/terminus.uni.gz
  502.  
  503. # Use Default BIOS Font (tends to be thick+bold for standard ASCII characters)
  504. ###set BIOSFONT=1
  505.  
  506. # 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
  507. ### set NOUNIFONT=1
  508.  
  509. # LARGE FONTS - FONTH specifies the font height (default = 16 = unifont)
  510. # If you set FONTH=24 E2B will use a default set of 24-pixel high fonts (grub4dos 0.4.6a only)
  511. ###set FONTH=24
  512. # You can also load your own font by using the FONT parameter - if FONTH=24 then the hex font file must must be 24-high format 
  513. # If 24 pixel high: 1024x768=85 chars x 32 lines, 800x600=66x25 lines
  514. # 24 pixel high fonts: yxt.f24=trad Chinese, ltxxx.f24, terminal.f24, developer.f24, X11.f24 - some fonts may not work in some languages
  515. ###set FONT=/_ISO/docs/Fonts/developer.f24
  516.  
  517. # --- MENU ENTRY SPACING ---
  518.  
  519. # grub4dos 0.4.6a allows you to set the spacing between text characters and between lines on the menu, default = 0:0  (Font spacing : Line spacing]
  520. # note that altering the line spacing will mean you will need to adjust your menu size/position parameters and text postitions, etc.!
  521. ###setmenu --font-spacing=1:2 > nul
  522.  
  523. # ---- DEFINE GLOBAL HOTKEYS (for all menus) ------
  524.  
  525. # See http://www.easy2boot.com/configuring-e2b/global-hotkeys/
  526.  
  527. # Set global hotkey CTRL+R for FASTLOAD Refresh - only defined if /FASTLOAD.YES is present
  528. ###if exist (bd)/FASTLOAD.YES ()/%grub%/hotkey [Ctrl+R] "clear && echo REFRESH > /FASTLOAD.YES && configfile /%grub%/menu.lst" > nul
  529.  
  530. # Program hotkeys to work in ALL menus - no separate menu entry is required. Some examples shown below.
  531. # Add global hotkeys - examples only - use ;; or ;& or && to separate commands.
  532. # Use @ to prevent commands displaying on screen when hotkey pressed - e.g. "@(bd)/%grub%/qrun.g4b force.isodefault  /_ISO/Linux/Ubuntu.iso ;; boot" > nul
  533. ###()/%grub%/hotkey [F9] "reboot" > nul
  534. ###()/%grub%/hotkey [F10] "halt" > nul
  535. ###()/%grub%/hotkey [Ctrl+F9] "clear && echo \nLoading Windows menu... && /%grub%/configX.g4b /%grub%/MenuWinInstall.lst" > nul