Build Your Own Free Windows Password Reset – Part 2

By | October 22, 2016

This is the second of a 2 part walkthrough.  You can review the previous post Build Your Own Free Windows Password Reset – Part 1 to catch up.  In this walkthrough we add Password Reset x64 to WinPE.  So, that when you boot your computer with WinPE it displays Password Reset x64.  In my previous post a I listed system requirements- and in this post we extend the requirements to include the PCWinRecovery files.

Requirements and prerequisites…

  • Microsoft Windows ADK (WADK)
  • Windows 10
  • USB flash drive (thumb drive) – to create a bootable USB flash drive
  • CD or DVD – to create a bootable CD/DVD
  • PCWinRecovery files

Following the previous post- you should have already downloaded and installed Deployment Tools and Windows Preinstallation Environment (Windows PE) from the Windows ADK.  If not head back to the previous post to catch up.

After you have the WinPE tools installed it’s time (1.) create a Windows PE working directory, (2.) mount boot.wim image so you can (3.) add packages, (4.) add the PCWinRecovery files, (5.) modify the Winpeshl.ini file, (6.) dismount .wim file, and (7.1.) create an ISO or (7.2.) create a bootable USB flash drive.

  1. Specify either 32-bit (x86) or 64-bit (amd64) O/S and the path to write the WinPE files.
    copype.cmd amd64 D:\WinPeImages\W1064
  2. Mount the WinPE image file that you created in step one.
    Dism /Mount-Image /ImageFile:"D:\WinPeImages\W1064\media\sources\boot.wim" /index:1 /MountDir:"D:\WinPeImages\W1064\mount"
  3. Add packages to WinPE.
    Dism /image:D:\WinPeImages\W1064\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-wmi.cab"
    Dism /image:D:\WinPeImages\W1064\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
    Dism /image:D:\WinPeImages\W1064\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFx.cab"
    Dism /image:D:\WinPeImages\W1064\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"
  4. Download PCWinRecovery files, extract and copy the PCWinRecovery files to your Windows PE system32 folder.
    copy "D:\pcwinrecovery\winpe" "D:\WinPeImages\W1064\mount\windows\system32"
  5. Modify the startnet.cmd.
    Right click on Notepad and select Run as administrator, and open startnet.cmd in the D:\WinPeImages\W1064\mount\windows\system32 folder and delete Wpeinit text and replace with pcwinrecovery.exe, and save as startnet.cmd.
  6. Save and dismount the image file.
    Dism /Unmount-Image /MountDir:"D:\WinPeImages\W1064\mount" /commit
  7. Create a bootable ISO to make a CD or create a bootable USB flash drive.
    1. Use this command to create a ISO file that you can use to create a boot CD/DVD.
      MakeWinPEMedia /ISO D:\WinPeImages\W1064 D:\WinPeImages\W1064\W1064.iso
    2. Use this command to create bootable USB flash drive. “F:” is an example, you should check your USB drive letter and modify as required.
      MakeWinPEMedia /UFD D:\WinPeImages\W1064 F:

Congratulations!  If you completed all the steps- you now have a USB flash drive or bootable CD/DVD that you can use to boot any computer.  Once the computer starts from the boot device- the Password Reset x64 displays and you’re ready to reset any Windows password.