How-to: Windows Recovery Environment (WinRE), Safe mode and Win PE.

A successor to the Windows Recovery Console, Windows Recovery Environment (WinRE) is a set of tools based on Windows Preinstallation Environment (Win PE). Windows PE utility (Wpeutil) is a command-line tool that enables you to run commands during a Windows PE session

Boot to Safe Mode

When dealing with a Blue Screen of Death or other critical errors - one option is to boot into Safe Mode.

  1. On the Windows sign-in screen, press and hold SHIFT while you select Power > Restart.
  2. After the PC restarts to the Choose an option screen, Troubleshoot > Advanced options > Startup Settings > Restart.
    You may be asked to enter your BitLocker recovery key.
  3. After your PC restarts, you'll see a list of options. Select 4 or F4 to start your PC in safe mode. Or if you'll need to use the Internet, select 5 or F5 for Safe Mode with Networking.

From safe mode you can run a system restore with %systemroot%\system32\restore\rstrui.exe

Boot to Windows Recovery Environment (winRE).

To do this, you will repeatedly turn your device off, then on:

    1. Hold down the power button for 10 seconds to turn off your device.
    2. Press the power button again to turn on your device.
    3. On the first sign that Windows has started (for example, some devices show the manufacturer’s logo when restarting) hold down the power button for 10 seconds to turn off your device.
    4. Press the power button again to turn on your device.
    5. When Windows restarts, hold down the power button for 10 seconds to turn off your device.
    6. Press the power button again to turn on your device.
    7. Allow your device to fully restart. You will enter winRE and have access to Bootrec.

Boot to Windows PE

WinPE most often runs from an external USB device like a memory stick. This can be used to disable services or replace system files until you are able to boot into safe mode.

  1. Connect the device.
  2. Turn on the PC, and use the boot menus to select the Windows PE drive. Typically this requires pressing a hardware button or a key, such as the Esc key. For UEFI-based PCs, you might need to find an option to manually select the UEFI boot files, for example, USBDrive01\EFI\BOOT\BOOTX64.EFI.
  3. Windows PE starts automatically. After the command window appears, the wpeinit command runs automatically. This might take a few minutes.

WinPE drive letter assignments change each time you boot

myscript.cmd

@echo off
For %%G in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
   if exist %%G:\myscript.cmd (
      Echo WinPE is running on drive: %%G
      REM other commands
   )
)

Setup local account security questions on Windows 10

To Set or Reset your local account password or security questions on Windows 10:

Settings > Accounts > Sign-in options >Password > Update your security questions.

How to sign in using security questions/answers

Attempt to Sign-in using an incorrect password.
Click OK and click Reset Password.
Type the correct answer to each of the security questions and press Enter.
Type a new password and press Enter.

Create a new Admin account and password.

On machines with Windows Defender, this procedure may not work, see here for an alternative using SAFE mode and RoboCopy.

    1. Boot from a Windows 10 bootable DVD or USB. (Alternatively boot into into Windows PE if setup.)
    2. If the computer does not have BitLocker, when WINDOWS SETUP appears, press SHIFT+F10 to launch a CMD window.
      If the computer has BitLocker, start the SETUP and choose REPAIR, it will ask you for the BitLocker recovery key and then let you open a command prompt.
    3. Type:
      REN d:\windows\system32\utilman.exe utilman.exe.bak
      and press the ENTER key.
    4. Type:
      COPY d:\windows\system32\cmd.exe d:\windows\system32\utilman.exe
      and press the ENTER key.
    5. Exit the Windows 10 setup (power down) and Boot normally to your hard drive.
    6. At the Login Screen click the EASE OF ACCESS icon (beside the Power icon in the bottom right corner of the screen). Because of step 4, this will launch a CMD window.
    7. Type NET user ss64 password1 /add and press the ENTER key
    8. Type NET localgroup administrators ss64 /add and press the ENTER key. Press ALT+F4 to close the CMD prompt. This creates a local administrator named ss64.
    9. Type wpeutil reboot to reboot the machine (alternatively click the Power icon (bottom right) and select RESTART.
    10. Sign in as ss64 with the password password1.
    11. If you are on a domain use the username .\ss64.
    12. Once logged in, replace the original file type:
      REN d:\windows\system32\utilman.exe.bak utilman.exe and press the ENTER key.

“When a deep injury is done us, we never recover until we forgive” ~ Alan Paton

Related commands:

Q12415 - Recovery options in Windows 10.
BCDBOOT - Create or repair a system partition.
BCDEDIT - Manage Boot Configuration Data.
BOOTREC - Repair or replace a partition boot sector (WinRE).
WPEUTIL - Run commands during a Windows Preinstallation Environment (WinPE)
Recovery /Reset options in Windows - Microsoft support.
WinPE Intro - Microsoft help page.
Windows Recovery - Create a new Admin user.
List of Windows Services


 
Copyright © 1999-2021 SS64.com
Some rights reserved