So this is wonderful. We have this cool “end all fix all” environment. So how do we GET it?
My first instructions download the Windows AIK for Windows 7 (if you’re Working with Server 2008R2 and Windows 7) or the Windows AIK for Vista (If dealing with Vista or Server 2008)
Now the newer one still works for making and editing the Vista AIK but it does not have SETFAILOVER.CMD (which is needed in Vista but not in Windows 7) to allow the Recovery Environment to “kick over”.
You’ll find the WinRE is sitting inside the BOOT.WIM file on your install Media. And yes, they are different. They FUNCTION the same but the Vista one is for Vista, Server is for Server, 7 is for 7, 64bit for 64bit O/S.
And that’s not to say you can’t play with it, and try using one for some work on another, they’re all based on Windows PE. The difference will be in the Automatic repairs or System restore features. So for best results, DON’T mix and match.
So Start up the Windows AIK by going to “Deployment Tools Command Prompt” and make sure you “Run as Administrator” and the build the folder structure for Windows PE. Run the COPYPE command
COPYPE X86 C:WINRE
So look in your install media, find a file called BOOT.WIM under the SOURCES folder on the root of the DVD.
Copy the Boot.WIM file locally to C:WINRE
COPY D:SOURCESBOOT.WIM C:WINRE
Then extract the Windows Recovery Environment from Index 2 from BOOT.WIM using the IMAGEX command from Windows AIK
IMAGEX /EXPORT C:WINREBOOT.WIM 2 C:WINREWINRE.WIM “Windows Recovery Environment”
Now we have the Windows Recovery Environment, but we need to reprogram the extracted version to trip over into the Recovery Environment on startup. This requires Two steps
Mount the Windows Recovery Environment
If you’re using The Windows 7 AIK the Command is
DISM /MOUNT-WIM /WIMFILE:C:WINREWINRE.WIM /INDEX:2 /MOUNTDIR:C:WINREMOUNT
If you’re using the Windows Vista AIK the Command is
IMAGEX /MOUNTRW C:WINREWINRE.WIM 1 C:WINREMOUNT
In both cases it will EXTRACT and bring the drive structure of the WINRE.WIM file into the C:WINREMOUNT folder
Once it is within that folder you need to copy a file called WINPESHL.INI into the SYSTEM32 of the WINRE environment
The contents of WINPESHL.INI are
It is a very simple text file that when the WINPE environment boots up, it launches that as it’s Operating Shell.
So copy it into SYSTEM32 of the WINRE Environment by running
COPY WINPESHL.INI C:WINREMOUNTWINDOWSSYSTEM32
Then once that is done, close up the Environment. Different if you are using again the Windows AIK for 7 or Vista.
Windows AIK for 7 run a
DISM /UNMOUNT-WIM /MOUNTDIR:C:WINREMOUNT /COMMIT
Windows AIK for Vista run a
IMAGEX /UNMOUNT /COMMIT C:WINREMOUNT
And that’s the basics. Next time we’ll go into how to actually make this USEFUL and Bootable in Both Vista AND Windows 7
The Energized Tech
”WinRE is staring at Powershell like the eyes of a Jealous lover…”