Step 1. Make hidden and system files available using Folder Options. You need to show hidden hidden files, folders and drives , uncheck Hide extentions for known file types and Hide protected operating system files(Recommended).
To access the Folder Options, there is a little difference in different operating system.
>> In Windows 7: Go to Computer -> Tools -> Folder Options.
>> In Windows 8/8.1/10, Go to This PC -> View -> Options, then you will see a Folder Options window.
Step 2. Copy the full path of winre.wim file. Go to the installation disc -> Source folder, hold Shift key and right click the winre.wim file, then choose Copy as path.
Step 3. Run cmd as admin. Then, type md c:\test\ in the command prompt window and hit Enter, it will create a folder named test on the C: drive.
Step 4. Mount the image file to the created folder using DISM command line.
In Windows 7:
dism /mount-wim /wimfile:"D:\sources\install.wim" /index:2 /mountdir:C:\test\ /readonly ("D:\sources\install.wim" is the location of winre.wim file)
In Windows 8/8.1/10:
dism /mount-image /imagefile:"D:\sources\install.wim" /index:1 /mountdir:C:\test\ /readonly
Step 5. Copy the winre.wim file from the created folder to C:\Windows\System32\Recovery folder. If you are asked to authorize this folder, click Continue to move on.
Step 6. Set the path for winre.wim file. Type the following cmd and run it in the command prompt window.
reagentc /setreimage /path C:\windows\system32\recovery
Step 7. Unmount the install.wim image file using DISM command line. Then, enable the recovery environment and check its status.
In Windows 7: dism /unmount-wim /mountdir:C:\test\ /discard
In Windows 8/8.1/10: dism /unmount-image /mountdir:C:\test\ /discard