REM Script to create boot entries for PBR in Vista BCD
REM Usage: scr_name
REM
REM Cleanup of bcd GUID: bcdedit /delete
REM Listing of BCD GUID: bcdedit /enum ALL [/v]
setlocal
set FILNAME=%1
set DESC=%2
set PBRDIR=\bcd
for /F "tokens=3 delims= " %%i in ('bcdedit /create /d %DESC% /application BOOTSECTOR') do set NEWGUID=%%i
bcdedit /set %NEWGUID% device boot
bcdedit /set %NEWGUID% PATH %PBRDIR%\%FILNAME%
bcdedit /displayorder %NEWGUID% /addlast
echo %NEWGUID% for %DESC% created
I had been planning to do this for quite sometime, but was not sure as to how do I store the GID generated by the first bcdedit command & pass it on to subsequent commands. I saw it on a forum which gave me this idea. This is just an enhancement of that.
No comments:
Post a Comment