diskpart
create vdisk file="C:\System\Win7.vhd" maximum=15368 TYPE=EXPANDABLE
sel vdisk file="C:\System\Win7.vhd"
attach vdisk
create partition primary
format fs=ntfs quick
assign letter=Z:
diskpart
sel vdisk file="C:\System\Win7.vhd"
attach vdisk
sel partition 1
assign letter=Z:
for /f "delims={,} tokens=2" %a in ('bcdedit -create -d "VHD Win7" -application osloader') do set guid=%a
bcdedit -set {%guid%} device vhd="[C:]\System\Win7.vhd"
bcdedit -set {%guid%} path \windows\system32\winload.exe
bcdedit -set {%guid%} locale zh-CN
bcdedit -set {%guid%} inherit {bootloadersettings}
bcdedit -set {%guid%} osdevice vhd="[C:]\System\Win7.vhd"
bcdedit -set {%guid%} systemroot \windows
bcdedit -set {%guid%} nx optin
bcdedit -set {%guid%} detecthal yes
bcdedit -displayorder {%guid%} /addlast
set guid=4681e9bd-e7ec-11de-aa78-00e04db6baa2
bcdedit -create {%guid%} -d "VHD Win7" -application OSLOADER
bcdedit -set {%guid%} device vhd="[C:]\System\Win7.vhd"
bcdedit -set {%guid%} path \windows\system32\winload.exe
bcdedit -set {%guid%} locale zh-CN
bcdedit -set {%guid%} inherit {bootloadersettings}
bcdedit -set {%guid%} osdevice vhd="[C:]\System\Win7.vhd"
bcdedit -set {%guid%} systemroot \windows
bcdedit -set {%guid%} nx optin
bcdedit -set {%guid%} detecthal yes
bcdedit -displayorder {%guid%} /addlast
bcdboot Z:\windows /s C:
for /f %a in ('dir /b/ad Z:\Recovery') do if exist Z:\Recovery\%a\Winre.wim if exist Z:\Recovery\%a\boot.sdi set reuid=%a
set RE=40556474-50f7-11df-8cf5-002618534e59
set RO=40556475-50f7-11df-8cf5-002618534e59
set RA=40556472-50f7-11df-8cf5-002618534e59
bcdedit -store C:\Boot\BCD -set {bootmgr} device partition=C:
bcdedit -store C:\Boot\BCD -set {memdiag} device partition=C:
bcdedit -store C:\Boot\BCD -set {default} device vhd="[C:]\System\Win7.vhd"
bcdedit -store C:\Boot\BCD -set {default} osdevice vhd="[C:]\System\Win7.vhd"
bcdedit -store C:\Boot\BCD -set {%RE%} device ramdisk=[Z:]\Recovery\%reuid%\Winre.wim,{%RO%}
bcdedit -store C:\Boot\BCD -set {%RE%} osdevice ramdisk=[Z:]\Recovery\%reuid%\Winre.wim,{%RO%}
bcdedit -store C:\Boot\BCD -set {%RO%} ramdisksdidevice partition=Z:
bcdedit -store C:\Boot\BCD -set {%RO%} ramdisksdipath \Recovery\%reuid%\boot.sdi
bcdedit -store C:\Boot\BCD -set {%RA%} device vhd="[C:]\System\Win7.vhd"
bcdedit -store C:\Boot\BCD -set {%RA%} filedevice vhd="[C:]\System\Win7.vhd"
bcdedit -store C:\Boot\BCD -enum all
diskpart
sel vdisk file="C:\System\Win7.vhd"
detach vdisk
diskpart
create vdisk file="C:\System\Win7_child1.vhd" parent="C:\System\Win7.vhd"
diskpart
create vdisk file="C:\System\Win7_child2.vhd" parent="C:\System\Win7_child1.vhd"
diskpart
sel vdisk file="C:\System\Win7_child2.vhd"
merge vdisk DEPTH=1
欢迎光临 无忧启动论坛 (http://bbs.wuyou.net/) | Powered by Discuz! X3.3 |