When Hiren’s BootCD PE boots, it creates a virtual drive in RAM, drive X:, where the system runs. If the computer has little memory, you can shrink that drive so it fits, for example to 3 GB (3072 MB). This helps on computers with 2 to 4 GB of RAM or when you see error 0xc0000017.
Before you start
- You need your Hiren’s BootCD PE USB drive already created (how to create it).
- Do this from a normal Windows installation, not from Hiren’s BootCD PE.
- In this example the USB drive is E:. Change the letter if yours is different.
Step by step
- Plug in the USB drive and open Command Prompt as administrator (search for “cmd”, right-click, “Run as administrator”).
- Copy and run these commands one at a time. The number
3072is the size in MB: change it if you want a different size.
mkdir C:\hbcd_pe
dism /cleanup-wim
dism /Mount-Wim /WimFile:E:\sources\boot.wim /index:1 /MountDir:C:\hbcd_pe
reg load HKLM\HBCD_PE_HKLM C:\hbcd_pe\Windows\System32\config\SYSTEM
reg add "HKLM\HBCD_PE_HKLM\ControlSet001\Services\FBWF" /v WinPECacheThreshold /t REG_DWORD /d 3072 /f
reg unload HKLM\HBCD_PE_HKLM
dism /Unmount-Wim /MountDir:C:\hbcd_pe /Commit
dism /cleanup-wim
rmdir C:\hbcd_pe
What each step does
- dism /Mount-Wim opens the system image (
boot.wim) on the USB drive in a temporary folder. - reg load / reg add / reg unload load that image’s registry, change the
WinPECacheThresholdvalue (the size of drive X: in MB) and close it again. - dism /Unmount-Wim /Commit saves the changes to the USB drive.
Important: do not unplug the USB drive while DISM is working. If something fails halfway, run dism /cleanup-wim before trying again.