You could automate this for all versions of bootmgr (Vista,7,2k8) using the same method too...
The same method requires a setting for each different bootmgr.
A generic approach would be nice.
Next trial, use search replace:
title Windows 7 setup \\boot\\bc1 - search replace
#set configfile \boot\bc1
#based on JFX [url="http://sanbarrow.com/phpBB2/viewtopic.php?t=1807"]http://sanbarrow.com...opic.php?t=1807[/url]
#Bcdedit.exe /store \boot\bc1 /set {bootmgr} nointegritychecks 1
#use a non default directory at USB drive
set bootmgr=/boot/bootmgr
#set BCD_last_char=1
find --set-root --devices=h %bootmgr%
map --mem %bootmgr% (rd)
#
cat --locate="\x74\x03\xE9\x08\x00\x39\x56" --replace="\xEB\x08\xE9\x08\x00\x39\x56" (rd)+1
debug off
#flag at 0x60000 - 0 to do - other done
write 0x60000 0
#Vista SP0 bootmgr contains a unicode string \Boot\BCD, search '\BCD\x00'
checkrange 0 read 0x60000 && cat --locate="\\\x00B\x00C\x00D\x00\x00" --replace="\\\x00B\x00C\x001\x00\x00" (rd)+1 && write 0x60000 1
checkrange 1 read 0x60000 && echo Vista SP0
#Windows 7 SP0 and SP1 : search \x28\x43\x00\x44
#cat --locate="\x28\x43\x00\x44" --replace="\x28\x43\x00%BCD_last_char%" (rd)+1 && write 0x60000 2
checkrange 0 read 0x60000 && cat --locate="\x28\x43\x00D" --replace="\x28\x43\x001" (rd)+1 && write 0x60000 2
checkrange 2 read 0x60000 && echo Windows 7 SP0 or SP1
#Vista SP1, Vista SP1, Windows 7 RC Build 7100 : search \x43\x00\x44\x00
checkrange 0 read 0x60000 && cat --locate="\x43\x00\x44\x00" --replace="\x43\x001\x00" (rd)+1 && write 0x60000 3
checkrange 3 read 0x60000 && echo Vista SP1, Vista SP1, Windows 7 RC Build 7100
chainloader (rd)+1
root ()
boot
There is a generic string '74 03 E9 08 00 39 56' at all bootmgr.
I's appears once at different bootmgr files.
Unfortunately there is no generic search string for BCD file
How to use %BCD_last_char% at search replace?
At second glance:
a search and replace at \x74\x03 and a different fixed offset BC? may be nicer.