Had some questions this week on what the behavior is for the WinRE.wim file.
WinRE is a lightweight Utility OS similar to WinPE that sits on a Fat32 partition (not encrypted) on the local disk. If the local Operating System detects that there is a problem, typically during the boot process, it can boot to WinRE and allow for some recovery.
The problem we had this week is where the file was getting placed, sometimes it was in C:\Windows\System32\Recovery\WinRE.wim, sometimes it was in c:\Recovery, and other times it was in a the WinRE recovery partition.
In a standard Windows Install.wim file the file should be located in the WIM at \Windows\System32\Recovery\WinRE.wim.
During windows Setup the OS will move the WIM file to another location depending on the state of the machine:
- It will install to the “Recovery” partition. Marked with the ID:
de94bba4-06d1-4d40-a16a-bfd50179d6ac (For uEFI/GPT machines)
- Copied to the Fat32 “System” partition. ( For MBR machines )
- On the “Windows OS” partition, this is not recommended for machines encrypted with BitLocker.
After OS installation, we may want to capture the machine back to an Install.wim file, and it would be nice to ensure that the WinRE.wim file get’s put back under the c:\Windows\System32\Recovery folder.
To do this, perform *either* of the following
- reagentc.exe /disable
- sysprep.exe /generalize
Most people will correctly run sysprep before capturing the image, so that is good.
Please do not copy the WIM files back to c:\Windows\System32\Recovery directly, this may break Recovery.
MDT and ZTIWinRE.wsf
Right now ZTIWinRE.wsf in the MDT kit is looking a little old. It was written many years ago, and rather than use the c:\windows\System32\Recovery\winre.wim file, it tries to use the existing WinPE wim file which can be retrofitted with the necessary WinRE components. Really this method is broken, especially if you are deploying more than one version of windows, say installing Windows 10 with a Windows 8.1 version of WinPE.
Really we should be injecting any boot critical drivers into WinRE, either when generating the captured OS, or during deployment.
Something for the future.