This tutorial is a guide to creating a standard WinPE boot disc (based on the Windows 7 AIK) containing Image for Windows.
Before beginning, please review the following requirements for the project:
Windows 7, Windows Vista SP1 (or later), or Windows XP SP3. Windows XP SP2 may work, but was not tested.
Note: The computer used to create the TBWinPE boot disc can be running a 32-bit or 64-bit version of the supported operating systems.
The Windows 7 AIK 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 2).
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 2).
The TBWinPE 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 must be installed on the system which you are using to create the build.
Note: If Image for Windows isn't installed to the default location, please see to Appendix 2 below. If you are unsure of the location, it's most likely at the default location.
Optional: The TBIView, TBIMount, and TeraByte OSD Tool Suite Pro (TBOSDTS) programs will also be included in the build if they are installed.
A little over 1GB of free space is required during the TBWinPE build process. Installing the Windows 7 AIK requires up to 1.5GB of free space.
The target system requires a minimum of 512MB. Booting the TBWinPE build on a system with less than 512MB is not recommended or supported.
Download the TBWinPE ZIP file from the a link below:
http://www.terabyteunlimited.com/downloads/wp/tbwinpe.zip
The TBWinPE download will be in the form of a ZIP file containing the 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 exists on the General tab. If it does, click the Unblock button. 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. 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. Important: It is required that the path to the folder and folder name itself DO NOT contain any spaces due to a limitation in one of the Windows AIK scripts. If you would like to use a space, consider using a hyphen or underscore instead. For example: C:\My_TBWinPE_Build
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.
The Windows 7 AIK 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.
Image for Windows requires a valid Product Key in order to function in full use mode. This information is stored in the imagew.ini file, which Image for Windows reads when it's run.
Note: If you already have the imagew.ini file from a BartPE, VistaPE, or Win7RescuePE build, you can copy that file into this folder and skip this step.
Using Windows Explorer, browse to the folder with the extracted TBWinPE files or select the already open Explorer window from Step 1.
Double-click on the imagew.ini file in this folder (or right-click on it and select Open from the pop-up menu). The file will open in Notepad.


After Key=, type in the Name and Key you received with Image for Windows. An example is shown below:

When finished, save the file and close Notepad.
If you're using Windows XP, double-click the TBWinPE.cmd file or right-click on it and select Open from the pop-up menu.
If you're using Windows Vista or Windows 7, the TBWinPE script needs to be run as an administrator. Right-click the TBWinPE.cmd file and select Run as administrator from the pop-up menu. If UAC is enabled (the default), click Continue or Yes at the UAC prompt to allow TBWinPE.cmd to run.
A Command Prompt window will open and the script will start running.

The process may take several minutes, depending on the speed of the computer.
When finished, the script will pause and wait for a key to be pressed before launching TeraByte's MakeDisk utility to create the TBWinPE bootable media.
Note: If you use a USB flash drive as the bootable media and have problems booting it, please see this KB article: Using a UFD (USB Flash Drive) as installation/boot media for TeraByte Unlimited products

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 bootable USB flash drive, it is recommended to use the Partition USB Mode option. Using a different mode may not allow the drive to boot correctly.
Click Finish to create the bootable media.
Booting the TBWinPE CD and initializing WinPE 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 plain WinPE build and does not include a taskbar or Windows-type shell.

To exit WinPE and reboot the computer, remove the WinPE boot media and close the Command Prompt window. To exit WinPE and shut down the computer, type shutdown at the prompt and press ENTER.
The TeraByte programs included in the build can be run from the prompt by typing the program name and pressing ENTER: imagew, tbiview, tbimount, tbosdtw
The TBWinPE script will display an error message if it can't find Image for Windows or the Windows AIK installation. If either of these are installed to non-default locations you will need to edit the tbwinpe.cmd file and set the correct paths (see Appendix 2).
A warning message will be displayed if the imagew.ini file can't be found in the TBWinPE script folder or appears invalid. Image for Windows will run in trial mode if the imagew.ini file doesn't exist or doesn't contain a valid Name and Key.
An error message will be displayed if the Drivers folder exists but contains no drivers or if there is a problem adding a driver. The build will not pause on these errors.
An error message will be displayed if the TBWinPE script is run without administrator privileges.
Note: Use a plain text editor (i.e. Notepad) to edit the tbwinpe.cmd file.
By default, the TBWinPE script expects the TeraByte programs and the Windows AIK to be installed at their default locations. If any of these programs are not installed at their default locations you will need to edit the appropriate path variable(s) and set the correct path.
ifwpath - Image for Windows path
tbiviewpath - TBIView and TBIMount path
tbosdtpath - TeraByte OSD Tool Suite Pro path
waikpath - Windows AIK path
Note: The TBIView, TBIMount, and TeraByte OSD Tool Suite Pro programs are optional. The script will include them if they are found.

Important: Do not include a trailing backslash in the paths.
Note: When running the script on a 64-bit version of Windows, edit the path variable on the if "%PROCESSOR_ARCHITECTURE%" == "AMD64" line or delete that line and edit the path variable on the other line.
Note: Use a plain text editor (i.e. Notepad) to edit the tbwinpe.cmd file.
Two options can be set in the TBWinPE script (tbwinpe.cmd). These options are located near the beginning of the file.
pausebuild - This option will pause the script after IFW has been added, but before the WIM file has been unmounted. This allows the user to browse the winpe_x86\mount sub-folder to verify the contents or to add content to the build. Set to 1 to enable.
Example: set pausebuild=1
bootprompt - This option will cause the TBWinPE CD to prompt the user to press an key before booting (just like the Windows installer CD/DVD does). If a key isn't pressed within a few seconds, the computer will boot normally from the hard drive. Set to 1 to enable.
Example: set bootprompt=1
The default screen resolution for Windows 7 WinPE is 800x600. This resolution isn't high enough to display the entire Image for Windows window. The ChgRes.exe program is used to change the resolution to 1024x768 after WinPE boots (before Image for Windows runs).
A different resolution can be selected in TBWinPE by running the ChgRes program and specifying the necessary options. Running ChgRes without any options will display usage information.
It is also possible to set the default resolution to a different mode by editing the startnet.cmd file with Notepad, replacing the ChgRes options with the new ones, and then recreating the build by running the TBWinPE script. Warning: Making any other changes to the startnet.cmd file is not recommended unless you are familiar with the WinPE building process.
Be aware that supported resolutions when booted into WinPE differ from those in Windows. Before modifying the startnet.cmd file, you should verify the resolution you want to use is valid in WinPE by testing it with ChgRes while booted to TBWinPE.
Windows Drivers can be added to the build by placing them into the Drivers folder. This folder should be located in the TBWinPE folder.
For example: C:\TBWinPE\Drivers

Folders in 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 need to add the NIC driver for the VMWare Accelerated AMD PCNet Adapter, you might place the driver files into C:\TBWinPE\Drivers\vmware (as shown below):

Drivers must be of the INF type. Windows installer 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 the 32-bit (x86) versions.
The winpe_x86 folder will be created in the TBWinPE folder during the building process. Upon completion, this folder will remain since it may be helpful to advanced users. If you wish, you may delete this folder to regain the space (approx. 250MB). The contents will be regenerated if the script is run again.