Win10 + WinPE ramdisk breaks after applying image via WIM

ThoughT

Member
Hi all,
I'm new to the forum but in need of dire help to hit a deadline, so any help is very appreciated. I'm using EasyBCD 2.3 with a business licence to dual boot Windows 10 (stored on partition 4) with a 20GB custom recovery partition which is located on partition 5. Par 5 contains an install.wim of the image on par 4 and winpe which I use EasyBCD to boot directly into. All works as it should, until I backup the image as .WIM files and restore it onto a new machine.

This is my backup script:
@echo ON
MKDIR "%CD%\ImageBackup"
powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
START /WAIT DISKPART.exe /S backupImage_diskpart.txt
DISM /capture-image /imagefile:"%CD%\ImageBackup\partition1.wim" /captureDir:h:\ /Name:"Recovery"
DISM /capture-image /imagefile:"%CD%\ImageBackup\partition2.wim" /captureDir:j:\ /Name:"System"
DISM /capture-image /imagefile:"%CD%\ImageBackup\partition5.wim" /captureDir:t:\ /Name:"Reimage_Partition"
exit

This is my restore Script:
@echo ON
START /WAIT DISKPART.exe /S Win10FranDiskpart.txt
powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
Dism /apply-image /imagefile:"%CD%\ImageBackup\partition1.wim" /index:1 /ApplyDir:T:\
Dism /apply-image /imagefile:"%CD%\ImageBackup\partition2.wim" /index:1 /ApplyDir:S:\
DISM /apply-image /imagefile:"%CD%\ImageBackup\Install.wim" /index:1 /ApplyDir:W:\
DISM /apply-image /imagefile:"%CD%\ImageBackup\partition5.wim" /index:1 /ApplyDir:R:\
for /f "tokens=2 delims==" %%f in ('wmic computersystem get model /value ^| find "="') do set "myVar=%%f"
dism.exe /Image:W:\ /Add-Driver /Driver:"%CD%\Drivers\%myvar%" /Recurse /ForceUnsigned /english /scratchdir:W:\
bcdboot.exe w:\windows /s s: /f all
exit

The only way I can get it to boot after applying the WIM is to add this: "bcdboot.exe w:\windows /s s: /f all"

I just need to be able to backup the wim and apply it to a new computer while retaining the customized boot. Any help would be greatly appreciated.
 
Back
Top