echo on
cls
::Initialiser le disque V:
diskpart.exe /s \diskpart.txt
::Applique l'image WinPE sur le disque V:
\StationPack\Restore\imagex.exe /apply \sources\boot.wim 1 v:
::Copie des fichiers d'amorçage
Xcopy \boot\*.* /e /f /y /r v:\boot\
copy \bootmgr v:
::Création d'un bcd temporaire
mkdir v:\temp\
bcdedit /createstore v:\temp\bcd
bcdedit /store v:\temp\bcd /d "Boot Manager" /create {Bootmgr}
bcdedit /store v:\temp\bcd /set {bootmgr} device boot
::Import de la bcd temporaire
bcdedit -import v:\temp\bcd
::Ajout de WinPE
For /F "tokens=3 delims= " %%1 in ('bcdedit /store v:\boot\bcd -create /d "[Restauration v4.1]" -application osloader') do set guid=%%1
bcdedit /store v:\boot\bcd /set %guid% osdevice partition=V:
bcdedit /store v:\boot\bcd /set %guid% device partition=V:
bcdedit /store v:\boot\bcd /set %guid% path \windows\system32\boot\winload.exe
bcdedit /store v:\boot\bcd /set %guid% systemroot \windows
bcdedit /store v:\boot\bcd /set %guid% locale fr-FR
bcdedit /store v:\boot\bcd /set %guid% winpe yes
bcdedit /store v:\boot\bcd /set %guid% detecthal yes
bcdedit /store v:\boot\bcd /displayorder %guid% -addlast
bcdedit /store v:\boot\bcd /default %guid%
::Deploiement des systemes
xcopy \StationPack\*.* /e /f /y /r v:\
::Ajout de Windows 2008 R2
"V:\Restore\7z465-x64\7z.exe" e V:\Restore\Win2008.7z -oV:\ -y
For /F "tokens=7 delims=. " %%1 in ('bcdedit /store v:\boot\bcd /copy {default} /d "Windows 2008 R2 (x64-EN)"') do set guidwin2008=%%1
bcdedit /store v:\boot\bcd /set %guidwin2008% device vhd=[V:]\Win2008.vhd
bcdedit /store v:\boot\bcd /set %guidwin2008% osdevice vhd=[V:]\Win2008.vhd
bcdedit /store v:\boot\bcd /set %guidwin2008% path \Windows\system32\winload.exe
bcdedit /store v:\boot\bcd /set %guidwin2008% locale en-US
bcdedit /store v:\boot\bcd /set %guidwin2008% winpe no
bcdedit /store v:\boot\bcd /set %guidwin2008% systemroot \Windows
bcdedit /store v:\boot\bcd /displayorder %guidwin2008% -addfirst
::Ajout de Windows 7
"V:\Restore\7z465-x64\7z.exe" e V:\Restore\Win7.7z -oV:\ -y
For /F "tokens=7 delims=. " %%1 in ('bcdedit /store v:\boot\bcd /copy {default} /d "Windows 7 (x64-FR)"') do set guidwin7=%%1
bcdedit /store v:\boot\bcd /set %guidwin7% device vhd=[V:]\Win7.vhd
bcdedit /store v:\boot\bcd /set %guidwin7% osdevice vhd=[V:]\Win7.vhd
bcdedit /store v:\boot\bcd /set %guidwin7% path \Windows\system32\winload.exe
bcdedit /store v:\boot\bcd /set %guidwin7% locale fr-FR
bcdedit /store v:\boot\bcd /set %guidwin7% winpe no
bcdedit /store v:\boot\bcd /set %guidwin7% systemroot \Windows
bcdedit /store v:\boot\bcd /displayorder %guidwin7% -addfirst
bcdedit /store v:\boot\bcd /default %guidwin7%
|