I've done lots of googling around until I found an article that did help me fix my issue to some extent... here: Cannot reboot after applying WIM file
I've created a 64 bit WinPE image stick using the Microsoft tutorials for mostly Window 10. I have some old windows 7 players that I'm trying to image to Windows 10... we used to use Ghost 64 bit.
I created an menu based batch script to image my players, my first 2 native windows 10 players(PCs) are working fine, but the older windows 7 player is not able to get re-imaged by... what it seems like anything. I can apply the image, but I ALWAYS have boot issues to some extent. By boot issues, either I get a "_" blinking line at the top left side of the screen when windows should be booting, or I get a boot record missing.
I'm using the standard EUFI partition script (yes my player is EUFI based)
rem == CreatePartitions-UEFI.txt ==
rem == These commands are used with DiskPart to
rem create four partitions
rem for a UEFI/GPT-based PC.
rem Adjust the partition sizes to fill the drive
rem as necessary. ==
select disk 0
clean
convert gpt
rem == 1. System partition =========================
create partition efi size=260
rem ** NOTE: For Advanced Format 4Kn drives,
rem change this value to size = 260 **
format quick fs=fat32 label="System"
assign letter="S"
rem == 2. Microsoft Reserved (MSR) partition =======
create partition msr size=16
rem == 3. Windows partition ========================
rem == a. Create the Windows partition ==========
create partition primary
rem == b. Create space for the recovery tools ===
rem ** Update this size to match the size of
rem the recovery tools (winre.wim)
rem plus some free space.
shrink minimum=650
rem == c. Prepare the Windows partition =========
format quick fs=ntfs label="Windows"
assign letter="W"
list volume
exit
And I've got the following to try and fix the boot issues (see echo WARNING ...)
:W10OPSPS
echo imaging c: drive for W10 OPS-PCAEQ-PS
echo.
@echo Find a drive that has a folder titled ApplyImages.
@for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%a:\ApplyImages\ set DriveLetter=%%a
@echo The ApplyImages folder is on drive: %DriveLetter%
@dir %DriveLetter%:\ApplyImages /w
echo.
echo Got the usb drive letter and move forward
echo.
DiskPart /s %DriveLetter%:\CreatePartitions-UEFI.txt
rem == Set high-performance power scheme to speed deployment ==
call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
cls
rem == Apply the image to the Windows partition ==
dism /Apply-Image /ImageFile:%DriveLetter%:\ApplyImages\%OPS-PCAEQ-PSImageName% /Index:1 /ApplyDir:W:\
rem == Copy boot files to the System partition ==
W:\Windows\System32\bcdboot W:\Windows /s S:
echo *WARNING* this is only needed on this player to fix some odd issue with the hardware imaging portion
DiskPart /s %DriveLetter%:\assignPartitionsAfterImaging(fix).txt
C:\Windows\System32\bcdboot C:\Windows /s C: /f ALL
bootsect /nt60 sys
echo.
echo the system has been imaged, press any key reboot, take out the USB stick once the reboot has commenced
echo.
echo.
PAUSE
exit
here's the other piece that I call during my attempt to fix the issue, just to say I'm issuing the same command to fix the issue in the end:
select disk 0
select vol W
assign letter=C
Regardless what I put after I apply the image to create the boot records, if I reboot, the I won't be able to boot. BUT, with the exception that I boot BACK into WinPE and run the following:
C:\Windows\System32\bcdboot C:\Windows /s C: /f ALL
Then I'm all good... and windows boots.
What the hell is going on? How can I automate this portion?