Download
 0: @echo off
 1: rem Copyright Szikra Istvan, 2011.04.24. All rights reserved. 
 2: rem If you want to do something with this just contact me at 
 3: rem   e-mail: szikra.istvan@freemail.hu
 4: rem   web: http://www.szikraistvan.hu/
 5: rem        http://foton.szikraistvan.hu/blog/
 6: 
 7: rem Just to show off some of my silly batch "programming" "skill" :)
 8: set /a FSRUNCNT=%FSRUNCNT%+1
 9: echo Foton Systems Batch Utils - FSBCDEdit v0.2 [^>%FSRUNCNT%^<]
10: echo Windows 7, Vista Boot Menu editor Helper
11: echo ! Do NOT use it unless you know what you are doing !
12: 
13: rem check for "/create" or "/copy" command line argument
14: SetLocal  EnableDelayedExpansion
15: set paramok=no
16: set paramhelp=no
17: 
18: rem for %%A in (%*) do (
19: rem   if "%%~A"=="/create" set paramok=yes
20: rem   if "%%~A"=="/copy" set paramok=yes
21: rem   if "%%~A"=="--help" set paramhelp=yes
22: rem   if "%%~A"=="-h" set paramhelp=yes
23: rem   if "%%~A"=="/?" set paramhelp=yes2
24: rem )
25: :loop
26: set /a paramcount=!paramcount!+1
27: if "%~1"=="/create" set paramok=yes 
28: if "%~1"=="/copy" set paramok=yes   
29: if "%~1"=="--help" set paramhelp=yes
30: if "%~1"=="-h" set paramhelp=yes    
31: if "%~1"=="/?" set paramhelp=yes2   
32: shift
33: if not "%~1"=="" goto loop
34: echo paramcount=!paramcount!
35: 
36: if %paramhelp%==yes goto usage
37: if %paramhelp%==yes2 goto noparam
38: if %paramok%==no goto noparam
39: 
40: EndLocal
41: rem guid token position depends on command and windows locale: EN-US, HU-HU, ...
42: for /f "delims={} tokens=2" %%A in ('bcdedit %*') do set id={%%A}
43: echo %%id%% is set to created GUID (%id%)
44: pause
45: goto :EOF
46: 
47: :noparam
48: bcdedit %*
49: echo.
50: 
51: :usage
52: EndLocal
53: echo usage example:
54: echo   fsbcdedit /create /d "Start Grub4dos" /application bootsector
55: echo   bcdedit /set %%id%% device partition=c:
56: echo   bcdedit /set %%id%% path \grldr.mbr
57: echo   bcdedit /displayorder %%id%% /addlast
58: 
59: echo   fsbcdedit /copy {ntldr} /d "ntldr copy" 
60: echo   bcdedit /set %%id%% device partition=\Device\HarddiskVolume1
61: echo   bcdedit /displayorder %%id%% /addlast