Creating a TeraByte WinPE Boot Disc Containing
Image for Windows (TBWinPE)

This tutorial is a guide to creating a standard WinPE boot disc (based on the Windows 7 AIK or Windows 8/8.1/10 ADK) containing Image for Windows.

Note: This tutorial covers using the TBWinPE/RE Builder Windows program. If you are using the TBWinPE.cmd script please click here to switch tutorials.

Requirements:

Before beginning, please review the following requirements for the project:

  • Operating System:
    • Windows 10
    • Windows 8 / 8.1
    • Windows 7
    • Windows Vista SP1 or later (Windows 7 AIK only)
    • Windows XP SP3 (Windows 7 AIK only)

    Note: The computer used to create the TBWinPE boot media can be running a 32-bit or 64-bit version of the supported operating systems. On either version you can create a 32-bit or 64-bit version of TBWinPE.

  • The Windows Automated Installation Kit (AIK) for Windows 7 or
    Windows Assessment and Deployment Kit (ADK) for Windows 8
    or
    Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1 or
    Windows ADK for Windows 10

    The Windows 7 AIK creates a build based on WinPE 3.0. Since this is a very large download (approx. 1.6GB), a high-speed internet connection is recommended. Once downloaded, the Windows 7 AIK must be burned to a DVD and then installed (see Step 2A).

    The download page can be found here:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34

    Note: Even though using the Windows 7 AIK on Windows XP isn't officially supported by Microsoft, test builds of TBWinPE on Windows XP SP3 completed successfully. If you install the Windows 7 AIK on Windows XP SP3, you will most likely also need to install one or both of the .NET Framework and MSXML 6 SP1 programs (see Step 2A).

    The Windows 8 ADK creates a build based on WinPE 4.0. The download size varies depending on which options are selected. The minimum estimated disk space required is 3.0GB (download may actually be around 2.6GB with an installed space of around 1.6GB). A high-speed internet connection is recommended.

    The download page can be found here:
    http://www.microsoft.com/en-us/download/details.aspx?id=30652

    Run the downloaded setup program to install the ADK (see Step 2B).

    Note: The Microsoft .NET Framework 4 is required. The Windows ADK should install it automatically, if necessary.

    The Windows 8.1 ADK creates a build based on WinPE 5.0. The download size varies depending on which options are selected. The minimum estimated disk space required is 3.0GB (download may actually be around 2.6GB with an installed space of around 1.6GB). A high-speed internet connection is recommended.

    The download page can be found here:
    http://www.microsoft.com/en-us/download/details.aspx?id=39982

    Run the downloaded setup program to install the ADK (see Step 2B).

    Note: The Microsoft .NET Framework 4.5 is required. The Windows ADK should install it automatically, if necessary.

    The Windows 10 ADK creates a build based on Windows PE for Windows 10. The download size varies depending on which options are selected. The minimum estimated disk space required is 3.4GB (installed space is around 1.74GB). A high-speed internet connection is recommended.

    The download page can be found here:
    https://msdn.microsoft.com/en-us/windows/hardware/dn913721.aspx

    Run the downloaded setup program to install the ADK (see Step 2B).

    Note: If multiple sources are installed (e.g. the Windows 7 AIK and the Windows 8 ADK) and the installation paths are found, the latest version will be selected. If desired, an older version can be used by specifying the path for it.

  • TBWinPE/RE Builder Files:

    The TBWinPE/RE Builder files must be downloaded and extracted to a folder on the system you are using to create the build.
    http://www.terabyteunlimited.com/downloads/wp/tbwinpe.zip

  • Image for Windows:

    Image for Windows must be installed on the system which you are using to create the build. Version 2.71 or later is required if building a 64-bit version of TBWinPE. Using the most current version of Image for Windows is recommended.

    Optional: The Image for Linux CD Boot files will be included if installed. The TBIView, TBIMount, and TeraByte OSD Tool Suite Pro (TBOSDTS) programs will also be included in the build if they are installed. Additionally, the standard TBOSDTS installed scripts and scripts in the public sub-folder will be included. TBOSDTS 1.47 or later is required to create the TBWinPE.bin boot file.

  • Hard Drive Space:

    Approximately 500MB of free space is required during the TBWinPE build process. Installing the Windows 7 AIK requires up to 1.5GB of free space. Installing the Windows 8/8.1 ADK requires a minimum of 1.6GB of free space. Installing the Windows 10 ADK requires a minimum of 1.74GB of free space. An additional approximate 300MB is required if creating the TBWinPE.bin boot file.

  • Memory (RAM):

    The target system requires a minimum of 512MB. Booting the TBWinPE build on a system with less than 512MB is not recommended or supported.

  • Drivers:

    Depending on the system, it may be necessary to add storage controller drivers to the build to have access to the drives when booted to TBWinPE. Examples of other drivers that may need added include USB 3.0 drivers and NIC drivers. Refer to Appendix 2, if necessary.

    Note: Builds based on versions of the Windows 8 ADK include native support for USB 3.0 (adding USB 3.0 drivers is not necessary). Commonly used Windows 7 USB 3 drivers can be downloaded by TBWinPE/RE Builder and included in builds based on Windows 7.

    Important Note for Systems using Drives Larger than 2.2TB: The versions of the Intel Rapid Storage Technology (RST) drivers included in the Windows 7 & 8 (8.0 version) WinPE do not properly support drives larger than 2.2TB. As a result, when this driver is used, the drive will be reported with an incorrect size (e.g. a 3TB drive showing as 746GB) and the file system on the drive may be corrupted. If using large drives on a system utilizing Intel RST it's strongly recommended to download the current driver and include it in the TBWinPE build. Go to the Intel Rapid Storage Technology (RST) page, click the driver link in the Latest Downloads section, then download either the f6flpy-x64.zip (for 64-bit Windows) or f6flpy-x86.zip (for 32-bit Windows) file. Note: If you must use an older version of the driver, version 10.1 is required for AHCI and version 10.5 is required for RAID.

Step 1: Download and Extract the TBWinPE/RE Builder Files

Download the TBWinPE ZIP file from the link below:
http://www.terabyteunlimited.com/downloads/wp/tbwinpe.zip

The download will be in the form of a ZIP file containing the TBWinPE/RE Builder program, TBWinPE CMD script, and supporting files.

Important Note: Since this file comes from another computer, Windows may block it. Whether this happens or not depends on the version of Windows and the security settings. If the file is blocked, it won't work correctly. To check if the file is blocked, right-click on the downloaded file, select Properties from the pop-up menu, and see if an Unblock button or checkbox exists on the General tab. If it does, click the Unblock button or check the box, then click OK. An example of a blocked file is shown below:

Extract the contents of this file to the folder from where you want to run TBWinPE/RE Builder. It is recommended that you create a new folder in the root of a drive (C:\TBWinPE, D:\TBWinPE, etc.) and extract the files there.

An example of the files extracted to the C:\TBWinPE folder is shown below:

You can leave this Explorer window open for use in Step 3, if you wish.

Step 2: Install the Windows 7 AIK or Windows 8/8.1/10 ADK

Reference Step 2A if installing the Windows 7 AIK.

Reference Step 2B if installing the Windows 8/8.1/10 ADK.

Step 2A: Install the Windows 7 AIK

The Windows 7 AIK creates a build based on WinPE 3.0. Since this is a very large download (approx. 1.6GB), a high-speed internet connection is recommended. Once downloaded, the Windows 7 AIK must be burned to a DVD and then installed.

The download page can be found here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34

The Windows 7 AIK download from Microsoft will be an ISO file, approximately 1.6GB in size. Once downloaded, burn the ISO file to a DVD with a utility such as BurnCDCC. This utility is included with IFW and can also be downloaded from TeraByte Unlimited at the link below:
http://www.terabyteunlimited.com/downloads-free-software.htm

To start the install, insert the DVD and wait for the Windows 7 AIK welcome screen to appear. If the DVD doesn't autorun when inserted, you can open the DVD drive in an Explorer window and then double-click startcd.exe.

Select Windows AIK Setup from the welcome screen menu. After some initialization and the license agreement screen, the following dialog will come up:

The defaults shown above will work fine and it's recommended to keep them. If you are unsure if there is enough free space on the installation drive, check the required disk space before proceeding by using the Disk Cost button. When ready, click Next to start the install. At completion, the following screen will appear:

Note: The Windows AIK requires both the .NET Framework and MSXML 6.0 to be installed. If they are not already installed on the system, Windows AIK Setup will detect this and request that you install either/both of these items first. Both are available to install from the same DVD and appear on the welcome screen menu as .NET Framework Setup and MSXML 6.0 [SP1] Setup. Windows XP (in particular) will usually require the installation of these programs.

Step 2B: Install the Windows 8/8.1/10 ADK

The Windows 8 ADK creates a build based on WinPE 4.0. The Windows 8.1 ADK creates a build based on WinPE 5.0. The Windows 10 ADK creates a build based on Windows PE for Windows 10. The download size varies depending on which options are selected. The minimum estimated disk space required ranges from 3.0GB to 3.4GB (actual download size is usually less with an installed space of 1.6GB to 1.74GB). A high-speed internet connection is recommended.

The Windows 8 ADK download page can be found here:
http://www.microsoft.com/en-us/download/details.aspx?id=30652

The Windows 8.1 ADK download page can be found here:
http://www.microsoft.com/en-us/download/details.aspx?id=39982

The Windows ADK for Windows 10 can be found here:
https://msdn.microsoft.com/en-us/windows/hardware/dn913721.aspx

To start the install, run the downloaded setup program (adksetup.exe). You can select to have the installer download the selected items or you can download the ADK for installation on a separate computer. In this tutorial, the Install option will be used.

Select the Install the Assessment and Deployment Kit to this computer option and click Next .

Note: Using the default Install Path will allow the script to find the installation automatically. If you use a custom path please see Appendix 2.

On the next screen, select whether or not to join the CEIP and click Next. On the License Agreement screen, click Accept. The following screen will display the features of the ADK available for installation.

To keep the download to a minimum it's recommended to limit the selection to the Deployment Tools and Windows Preinstallation Environment (Windows PE) features (if the Microsoft .NET Framework 4.0/4.5 feature is available it must also be selected). Click the Install button. If you get a UAC prompt, click Continue or Yes to allow the program to run.

Allow the installation to complete. This may take considerable time, depending on the speed on the internet connection.

Step 3: Running TBWinPE/RE Builder

Double-click the TBWinPE.exe file or right-click on it and select Open from the pop-up menu. On Windows Vista or later, if UAC is enabled (the default), click Continue or Yes at the UAC prompt to allow the program to run.

The TBWinPE/RE Builder program will run and display the Welcome screen.

Click Next. The Project Type screen will be shown.

Select the TBWinPE project type.

Note: Default settings will work for most standard builds. If you need to adjust the program or build settings click Settings. Details on the available settings can be found here.

Click Next. The License screen will be shown.

Enter your Image for Windows licensed name and product key. Leave the fields blank if using the trial version of Image for Windows. Enter the license information for the version of Image for Windows being included in the build. To skip this step in future builds if the format of the license information previously entered or imported appears valid, check the option. Click Next to continue.

Build requirements will be checked.

If no warnings are issued and no errors found the next screen will be displayed automatically. If there are errors or warnings (if not ignored) they will be displayed for review. To ignore warnings in the future check the Ignore warnings when checking requirements option. Click Next to continue.

By default, if the build is based on Windows 7 (Windows 7 AIK, in this case) and the USB 3 drivers aren't found you will be prompted to download them. It is recommended to include these drivers to support systems with USB 3. Click Download to start the process. Once downloaded, the license agreements will be displayed. Click to accept the licenses and then click OK to use the drivers.

Click Next to continue. The Build Type screen will be shown.

Select the desired build type to create. Options will be disabled if not supported.

The following build types are available:

32-bit (x86) TBWinPE: Select this to create the 32-bit (x86) version of TBWinPE. If adding drivers or other programs they will need to be the 32-bit versions.

64-bit (AMD64) TBWinPE: Select this to create the 64-bit (AMD86) version of TBWinPE. If adding drivers or other programs they will need to be the 64-bit versions. This build requires Image for Windows 2.71 or later.

Create boot file TBWinPE.bin for use with TeraByte's BOOTFILE program: Select to enable/disable creating the TBWinPE.bin boot file for use with TeraByte's BOOTFILE program (supports booting directly to the file from Windows). When enabled, the selected build type will create the boot file instead of the standard boot media.

Select the desired build option and click Next to continue. The Build Summary screen will be shown.

At this point you can either create the build by clicking Start or go back if you need to make changes.

The build process may take several minutes, depending on the speed of the computer.

Note: When the script is unmounting the WinPE image file it may take several minutes. Some anti-virus programs may cause a slow unmount or an unmount error. If the unmount fails you will be prompted to try it again.

TBWinPE/RE Builder will stop if it encounters an error during the build process. A log file (TBWinPE.log) is also created by default and can be examined if there are issues (select View Log from the Help menu).

When the build has completed, if creating a TBWinPE CD, USB flash drive (UFD), or ISO file, click Finish to launch TeraByte's MakeDisk utility to create the desired TBWinPE boot media. Otherwise, just exit the program.

Click Next to start the process and then select the bootable media type you want to create. In the example below, a USB flash drive is selected.

Important: When creating a TBWinPE bootable USB flash drive (UFD), it's recommended to use a Partition USB Layout option (e.g. Partition - MBR FAT/FAT32 Partition). Using the No Partition mode may not allow the drive to boot correctly. If you have problems booting the UFD, please see this KB article: Using a UFD (USB Flash Drive) as installation/boot media for TeraByte Unlimited products.

Click Finish to create the bootable media. If you wish to create another boot media (e.g. you created a CD and also want a UFD), you can run MakeDisk from the TBWinPE folder (it's not necessary to recreate the build unless you've updated the installed TeraByte programs or the TBWinPE/RE Builder files).

Step 4: Using TBWinPE

Booting into TBWinPE will typically take several minutes, depending on the system.

The TBWinPE desktop will look similar to the screenshot below. Please note that this type of build is a relatively plain WinPE build and does not include a taskbar or Windows-type shell. TBLauncher can be used to easily run the included programs, or shut down or restart the system.

To exit TBWinPE, remove the TBWinPE boot media and click either the Shut down or Restart button in TBLauncher.

Note: Some systems using TBWinPE created from the Windows 8 ADK may exhibit a delay when shutting down or restarting. If this happens you can hold down the Shift key when clicking the button to force the action.

The TeraByte programs included in the build can be also run from a Command Prompt window by typing the program name and pressing ENTER: imagew, tbiview, tbimount, tbosdtw

 


Appendix 1 - Using Custom Settings

By default, TBWinPE/RE Builder expects the TeraByte programs and the Windows AIK/ADK to be at their installed/default locations. If any of these programs are not installed or are not found automatically you will need to set the correct paths.

Details on settings and options available for the build can be found in Settings.

Appendix 2 - Adding Windows Drivers

Windows Drivers can be added to the build by placing them into the Drivers folder. This folder should be located in the build folder (C:\TBWinPE in this example): C:\TBWinPE\Drivers

The Drivers folder will be searched for drivers when the build is being created. Placing the files for each added driver into their own folder is usually the simplest method. For example, if you're creating the TBWinPE 64-bit build using the Windows 7 AIK and need to add 64-bit USB 3.0 drivers, you might place the driver files into C:\TBWinPE\Drivers\usb3x64 (as shown below):

Drivers must be of the INF type (.inf) and all supporting files (.cat, .pnf, .sys, .oem, .dll, etc.) must be included. All driver related files and sub-folders should be in the same folder with the .inf file. In most cases, the driver files are packaged together in a folder and you can just copy that folder into the Drivers folder (this will copy all the files and any sub-folders).

Windows installer (e.g. .msi files) or other driver package types (like .exe files) are not supported. In addition, INF files that are not valid driver packages will be ignored.

Drivers used should be 32-bit (x86) versions for 32-bit (x86) builds and 64-bit (AMD64) versions for 64-bit builds. Use Windows 7 drivers for builds based on the Windows 7 AIK. Use Windows 8 drivers for the builds based on the Windows 8 ADK. Use Windows 10 drivers for builds based on the Windows 10 ADK.

Appendix 3 - The "ISO" and Other Build Folders

The ISO folder contains the files used to create the build. When the build has completed and the boot media has been created, this folder can be deleted to regain the space (approximately 135-300MB, depending on the build). If deleted, the folder will be recreated when the program is run again. This folder is not automatically deleted by the script as it may be useful to advanced users.

The mount folder is used to mount the WinPE boot.wim file being modified.

The config folder contains the configuration files used by TBWinPE/RE Builder.

The Drivers_Win7PEUSB3 folder contains the downloaded USB 3 drivers for builds based on Windows 7.

Appendix 4 - Directly Booting TBWinPE/RE WIM File in Windows 7 or Later

TBWinPE/RE Builder can configure Windows to directly boot the WIM file from a standard TBWinPE or TBWinRE build when using Windows 7 or later. This allows booting into the TBWinPE/RE environment with a simple restart of Windows with no boot media required. Note: When creating a WIM to boot it's recommended to use a standard boot media build type (e.g. TBWinRE CD/UFD/ISO option). If just creating the WIM for booting it's not necessary to create the boot media when the build finishes - the WIM file (boot.wim) is located in the build's ISO\sources folder.

To utilize this feature, run TBWinPE/RE Builder (TBWinPE.exe) from the command line and specify the /bootwim parameter. Usage information is detailed below.

BOOTWIM Command Usage

/bootwim wim_path [ /run script_file ] [ /noboot ] [ /quiet ] [ /force ] [ /idt ]
/bootwim /reset
/bootwim /remove
/bootwim /?

Boots the WIM file specified by wim_path. If path or filename includes spaces, surround with quotes. WIM path can be relative or absolute and can use a drive letter or volume GUID. The location of the WIM file cannot be read-only as several support files must be created in the WIM file's folder.

run - Runs the specified script or command file after booting. If path or filename includes spaces, surround with quotes. script_file can be a .cmd/.tbs/.run script or a text file (.txt) with command line parameters for IFW. The file must be located on a partition accessible when booted to TBWinRE/PE. To specify a script file that is internal to the WIM, preface the path with [WIM] instead of a drive letter (full path must be used, starting at root). This option requires a TBWinRE/PE WIM configured to use TBLauncher v1.13+ (TBLauncher is used by default in these builds).

Keep in mind that when a script is specified to run that it will replace any TBLauncher auto-run option configured in the WIM when it was created. For example, if you had configured TBLauncher to run a RunScript.cmd file on startup, that script will not be run. However, if the InitScript.cmd script was configured it will still be run prior to the specified script.

noboot - Don't restart the system after configuring to boot WIM.

quiet - Don't display messages or prompt to restart.

force - Force system to restart. This may cause data loss if you have unsaved files.

idt - Ignore drive type (allow unsupported drive types).

reset - Clears booting of WIM on next restart.

remove - Removes TBWinPE BOOTWIM entries from BCD and clears booting of WIM on next restart if configured.

? - Displays usage information.

Examples:

tbwinpe.exe /bootwim custom.wim /force

  • Will configure the system to boot custom.wim, prompt user to restart, and force a restart.

tbwinpe.exe /bootwim offline.wim /run backup-c.txt /quiet

  • Will configure the system to boot offline.wim and run IFW using the command line parameters in backup-c.txt. User will not be prompted to restart.

  • Keep in mind that any scripts or IFW command files should reference disks and partitions as they will be when booted to TBWinPE/RE, which can be different from normal Windows. For example, backup-c.txt uses the GUID values instead of drive letters:

    /b /d:{6DC69B20-2C93-40AE-AE07-B3025C4E29D8}@0x4 /f:{363CA4D2-9012-47E0-A1B3-852AD9C4A27A}@0x2:"\Win10 Drive C" /v /desc:"Backup of Win10 partition" /hash

tbwinpe.exe /bootwim "\\?\Volume{3cdba6bf-0c87-993e-6bde-77590f490200}\IFW Offline\boot.wim"

  • Will configure the system to boot boot.wim using the volume GUID (no drive letter assigned) and prompt the user to restart.

tbwinpe.exe /bootwim iso\sources\boot.wim /run [WIM]\myscripts\backupwin10.cmd

  • Will configure the system to boot boot.wim and run the backupwin10.cmd script, which is included in the WIM in the \myscripts folder.