Use Push Button Reset in Standard 8 (Standard 8)

7/8/2014

Learn how to set up, enable and use Push Button Reset on your Windows Embedded 8 Standard (Standard 8) device.

Push-button reset is a new feature introduced in Windows 8 that enables your users to repair their devices quickly while preserving their data and important customizations. You can think of it as the next generation of System Restore functionality that was in earlier version of Windows. Instead of just being able to restore your device back to some predefined settings, you can now completely roll back to a previous state and even save your data if you want to. It’s not like your traditional backup and restore experience, and it can be done in less than 20 minutes.

Reset Your Device

Resetting your device does exactly what it sounds like: for a particular device, the entire OS partition is reset to a predefined state. This predefined state is represented by a Windows image (.wim) file.

To reset a device with Windows Embedded 8 Standard (Standard 8):

Step 1: Prepare the system

  1. Create a Standard 8 image that includes the following modules:

  2. During installation in Image Builder Wizard (IBW), select Create separate system partition to create a hidden drive.

Step 2: Prepare the system to create a recovery image

  1. After the system starts, open a command prompt with administrator rights.

  2. Disable any active Windows Recovery Environment (Windows RE) that is mapped to the system that is currently running.

    1. At the command prompt, type the following:

      Reagentc.exe /disable
      
  3. Add Windows RE to the target device running Standard 8. For example, if the system drive is mounted to drive C, you would do the following:

    1. Copy winre.wim from the installation DVD (32-bit/64-bit).
      For example,\sources\winre.wim
    2. Copy winre.wim to the local machine.
      For example, C:\windows\system32\recovery
  4. At a command prompt, enable the custom Windows RE by typing the following:

    Reagent.exe /enable
    

Step 3: Create a recovery image for reset operation

  1. At a command prompt, set the system to boot into Windows RE for the next occurrence by typing the following:

    Reagent.exe /boottore
    
  2. At a command prompt, restart the system by typing the following:

    Shutdown /r
    
  3. Reboot into Windows RE by doing the following:

    Point to Select Troubleshoot , point to Advanced Options, and then click Command Prompt.

  4. Create a recovery image by doing the following:

    1. In a location other than the system drive, create a folder to store recovery image (for example, D:\recovery).

    2. At the command prompt, type the following:

      dism /capture-image /imagefile:D:\recovery\install.wim /capturedir:C:\ /name:”Reset Img”
      
  5. Register the captured recovery image by typing the following at the command prompt:

    C:\windows\system32\reagentc.exe /setosimage /path D:\recovery /target C:\windows /index 1
    
  6. Exit the command window and restart into Standard 8.

Step 4: Reset the system

  1. In PC Settings, select the General tab, and then select Remove everything and reinstall Windows.

  2. Choose one of the two options: Just Remove My Files or Fully Clean the Drive.

Refresh Your Device

Refreshing your device gives the same “fresh OS” benefit that’s provided by resetting a device, but also lets you retain some of the data on the device. Specifically, anything located outside the following directories will remain untouched:

  • %windir%
  • %programfiles%
  • %programfiles(x86)%
  • %programdata%
  • %appdata%\local
  • %appdata%\locallow
  • %appdata%\roaming
  • Any root-level folder that is also found on the recovery image (such as C:\YourCompanyName)
  • A handful of key registry keys and files

With that knowledge, take these steps to refresh your device:

Step 1: Configure the system to enable push-button reset

  1. Create a Standard 8 image that includes the following modules:

  2. During installation in Image Builder Wizard (IBW), select Create separate system partition to create a hidden drive.

Step 2: Prepare the system to create a recovery image

  1. After the system starts, open a command prompt with administrator rights.

  2. Disable any active Windows Recovery Environment (Windows RE) that is mapped to the system that is currently running.

    1. At the command prompt, type the following:

      Reagentc.exe /disable
      
  3. Add Windows RE to the target device running Standard 8. For example, if the system drive is mounted to drive C, you would do the following:

    1. Copy winre.wim from the installation DVD (32-bit/64-bit).
      For example,\sources\winre.wim
    2. Copy winre.wim to the local machine.
      For example, C:\windows\system32\recovery
  4. At a command prompt, enable the custom Windows RE by typing the following:

    Reagent.exe /enable
    

Step 3: Create a recovery image for refresh operation

  1. Create a recovery image by doing the following:

    • In a location other than the system drive, create a folder to store recovery image (for example, D:\recovery).

    • At the command prompt, type the following:

      recimg /createimage D:\recovery 
      

Step 4: Reset the system

  1. In PC Settings, select the General tab, and then select Refresh your PC without affecting your files.

An Example of Servicing via Refresh

Many Windows Embedded customers choose to service their devices by “reflashing” them: basically, installing a fresh copy of the OS on their hardware. This often is done when installing a Service Pack. You may be able to instead use push button refresh to more easily service your devices.

Let’s say you deploy cash registers all over the world. They are the same devices and all run the same software, but the software is configured differently depending on the locale. To reflash these devices, you would either need to reconfigure them after refreshing them, or you would need to create several different device configurations for servicing your devices all around the world.

Instead, consider storing configuration data for all devices and applications outside of system directories. In this scenario, one single reference device could have all updates applied to it and can be used as the refresh .wim file for all of cash registers. Refreshing all cash registers to this .wim file would update them in a more secure and stable manner while leaving the user experience untouched. This would help reduce the cost and possible downtime that comes with mass reflashing of devices.

To set up a reference device to use for push-button refresh

  1. Download updates (.msu) from the Microsoft Download Center.

  2. Create a directory on the development device and mount the recovery image to that directory by typing the following at the a command prompt. In this example, the D:\Mount is the directory to create on the recovery device and the recovery image is stored under the path D:\recovery\customrefresh.wim):

    MD D\Mount
    DISM /Mount-Image /ImageFile:D:\recovery\customrefresh.wim /Index:1 /MountDir:D\Mount
    
  3. Apply the update package (.msu) file by typing the following at a command prompt, replacing <file_path> with the full path to the configuration set:

    DISM /Image:D\Mount /Add-Package /Packagepath:<file_path>
    
  4. Unmount the image and commit the changes by typing the following at a command prompt:

    DISM /Unmount-Image /MountDir:D\Mount /Commit
    

Reset or Refresh an Image from an External Storage Device

To support refreshing from a single reference device, you may want to refer to a .wim file stored on an external storage device, such as a USB flash drive. To do that, perform the following steps. In the following examples, E is the drive letter of the USB flash drive and the recovery image is stored under the path E:\recovery.

Step 1: Prepare the USB flash drive

  1. Insert a USB flash drive. The USB device must be configured to be fixed media and not removable media.

  2. On the Start screen, type “create a recovery drive”, select the Settings search scope, and then select Create a recovery drive.

Step 2: Create a recovery image

  1. Follow the previously discussed procedures for capturing and registering the recovery image, changing the stored path of the captured image to the external storage device drive.

  2. If a recovery image already exists, you can copy the image to the USB flash drive but you must re-register the recovery image.

    1. For a refresh image, use the following command:

      recimg /setcurrent E:\recovery
      
    2. For a reset image, use the following command:

      C:\windows\system32\reagentc.exe /setosimage /path E:\recovery /target C:\windows /index 1
      

Step 3: Refresh or reset the system

  1. Restart the system and boot into Windows RE using the USB flash drive.

  2. On the Windows RE Tools menus, do one of the following:

    1. To refresh the device, point to Troubleshoot, and then click Refresh your PC.
    2. To reset the device, point to Troubleshoot, and then click Reset your PC

See Also

Other Resources

Add Updates to an Image