-tạo phân vùng Recovery, set thuộc tính (tùy BIOS mode hoặc UEFI)
Bios mode:
Mã:
diskpart>
create partition primary
format quick fs=ntfs label="Recovery"
assign letter="R"
set id=27
UEFI:
Mã:
diskpart>
create partition primary
format quick fs=ntfs label="Recovery"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
-tạo thư mục trên phân vùng mới và copy file Winre.wim
Ví dụ:
Mã:
md R:\Recovery\WindowsRE
xcopy /h W:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\
reagentc /setreimage /path R:\Recovery\WindowsRE /target W:\Windows
reagentc /enable
R: là phân vùng Recovery mới tạo
W: là phân vùng chứa Windows
Các bước thì nó như vậy, nhưng khi thực hiện thì nó sẽ dài dòng. Nên thực hiện lệnh
reagentc /enable trong môi trường winPE, lúc đó câu lệnh sẽ khác 1 chút:
Mã:
reagentc /enable /osguid {00000000-0000-0000-0000-000000000000}
gõ lệnh
reagentc /enable /? để tìm help
Tham khảo cách dùng lệnh reagentc:
Mã:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/reagentc-command-line-options?view=windows-11