Export (0) Print
Expand All
3 out of 5 rated this helpful - Rate this topic

Deploy Push-Button Reset Features

Updated: October 20, 2013

Applies To: Windows 8, Windows 8.1

This walkthrough shows how to create and deploy a customized push-button reset recovery image.

In this topic:

To complete this walkthrough, you need the following:

This step describes the process you complete one time in preparation of deploying recovery images.

  1. In Notepad, create a text file with the commands required to add drive letters to each partition.

    • UEFI:

      rem == AssignLettersToPartitions-UEFI.txt
      select disk 0
      select partition 1
      assign letter="T"
      select partition 2
      assign letter="S"
      select partition 4
      assign letter="W"
      select partition 5
      assign letter="R"
      list volume
      exit
      
    • BIOS:

      rem == AssignLettersToPartitions-BIOS.txt
      select disk 0
      select partition 1
      assign letter="S"
      select partition 2
      assign letter="W"
      select partition 3
      assign letter="R"
      list volume
      exit
      
  2. Save your completed file as either E:\Recovery\AssignLettersToPartitions-UEFI.txt or E:\Recovery\AssignLettersToPartitions-BIOS.txt, based on your firmware type.

  1. In Notepad, create a text file with the commands required to identify and hide the recovery partitions.

    • UEFI:

      rem == HideRecoveryPartitions-UEFI.txt
      select disk 0 
      select partition 1 
      remove 
      set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac 
      gpt attributes=0x8000000000000001 
      select partition 5 
      remove 
      set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac 
      gpt attributes=0x8000000000000001 
      list volume
      
      The recovery partitions use the ID: PARTITION_MSFT_RECOVERY_GUID (de94bba4-06d1-4d40-a16a-bfd50179d6ac) to define the partitions as recovery partitions.

      The recovery partitions use the GPT attributes: 0x8000000000000001 to define the partitions with a combination of two attributes: GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER and GPT_ATTRIBUTE_PLATFORM_REQUIRED. For more information, see PARTITION_INFORMATION_GPT structure.

    • BIOS

      rem == HideRecoveryPartitions-BIOS.txt 
      select disk 0
      select partition 3
      set id=27
      remove
      list volume
      exit
      
  2. Save your completed file as either E:\Recovery\HideRecoveryPartitions-UEFI.txt or E:\Recovery\HideRecoveryPartitions-BIOS.txt, based on your firmware type.

This step describes the process you complete when deploying recovery images onto each PC you manufacture.

  1. Boot the destination computer.

  2. When Out-Of-Box Experience (OOBE) appears, turn off the computer by holding down the power button for more than five seconds.

  3. Boot into Windows PE.

  1. Add the drive letters to your recovery partitions by using the script you created in Step 1: Prepare to Deploy PCs by Creating Scripts:

    Diskpart /s E:\Recovery\AssignLettersToPartitions-<firmware>.txt
    

    Where <firmware> is either UEFI or BIOS.

  2. Capture the recovery image:

    Dism /Capture-Image /CaptureDir:W:\ /ImageFile:R:\RecoveryImage\Install.wim /Name:"Recovery image" /NoRpFix
    
  3. Restrict the Write and Modify permissions of the recovery image folder to the local Administrator group.

    W:\Windows\System32\icacls e:\recoveryImage /inheritance:r /T
    W:\Windows\System32\icacls e:\recoveryImage /grant:r SYSTEM:(F) /T
    W:\Windows\System32\icacls e:\recoveryImage /grant:r *S-1-5-32-544:(F) /T
    
  4. Optional: copy the push-button reset extensibility scripts and configuration files to the recovery image partition:

    Xcopy E:\RecoveryImage\* /s R:\RecoveryImage\
    

    For more information, see Add a Script to Push-Button Reset Features.

  5. Register the push-button reset recovery image:

    W:\Windows\System32\Reagentc /Setosimage /Path R:\RecoveryImage /Target W:\Windows /Index 1
    
  1. Identify and hide the recovery partitions by using the script you created in Step 1: Prepare to Deploy PCs by Creating Scripts:

    Diskpart /s E:\Recovery\HideRecoveryPartitions-<firmware>.txt
    

    Where <firmware> is either UEFI or BIOS.

  1. Verify the status and location of the Windows RE boot image and the recovery image for push-button reset, based on your firmware type.

    W:\Windows\System32\Reagentc /info /target W:\Windows
    

    The configuration status text should resemble the following:

    • UEFI:

      Windows RE status: <either Enabled or Disabled>
      Windows RE location: 
      Boot Configuration Data (BCD) identifier: 00000000-0000-0000-0000-000000000000
      Custom boot key scan code: 0x0
      Recovery image location: \\?\GLOBALROOT\device\harddisk0\partition5\RecoveryImage
      Recovery image index: 1
      Custom image location:
      Custom image index: 0
      
    • BIOS:

      Windows RE status: <either Enabled or Disabled>
      Windows RE location: 
      Boot Configuration Data (BCD) identifier: 00000000-0000-0000-0000-000000000000
      Custom boot key scan code: 0x0
      Recovery image location: \\?\GLOBALROOT\device\harddisk0\partition3\recoveryImage
      Recovery image index: 1
      Custom image location: 
      Custom image index: 0
      
    noteNote
    The Windows RE status appears as <Disabled> before the specialize configuration pass runs, and <Enabled> after the specialize configuration pass runs.

  2. Shut down or reboot your computer, either by physically powering the computer off, or by using the following command:

    Wpeutil shutdown
    
  1. Boot the computer, and then complete OOBE as if you were your user.

    ImportantImportant
    Troubleshooting: If after rebooting, the PC boots directly to the system BIOS screen or to a black screen with a flashing cursor, you can try the following steps.

    1. Boot the system to Windows PE, and then copy the boot files to the system partition by running following command:

      C:\windows\system32\bcdboot C:\windows
      
      Where C: is the drive letter of your primary partition. If you need to determine your primary partition while in Windows PE, list the drive letters with the following Diskpart command: list vol.

      Reboot the PC.

    2. For UEFI-based computers, boot to the firmware menus, and manually select the boot files from the hard drive. For example, select Boot to file, and then navigate to \HardDrive01\EFI\Boot\bootx64.efi.

  2. Open the Settings charm > More PC settings, and then select General.

  3. Under Refresh your PC without affecting your files, click Get started, and then follow the instructions.

  4. Log on to the refreshed PC.

  5. If you're using custom scripts, verify that they worked correctly. For more information, see Add a Script to Push-Button Reset Features

  6. Open the Settings charm > More PC settings, and then select General.

  7. Under Reset your PC and start over, click Get started, and then follow the instructions.

  8. Follow the prompts to verify that you're not prompted to insert either the installation or recovery media.

  9. Complete OOBE as your user.

  10. Again, if you're using custom scripts, you must verify that they worked correctly. For more information, see Add a Script to Push-Button Reset Features

Now that you have customized and deployed the recovery image for push-button reset, you can optionally create recovery media to include with the PC. For more information, see Create Media to Run Push-Button Reset Features.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.