# MSFN Forum: How to make a basic WinPE 2.0 CD - MSFN Forum

• 2 Pages
• 1
• 2

## How to make a basic WinPE 2.0 CD Rate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.msfn.org/board/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=83722&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1Spooky

• Friend of MSFN
• Group: Members
• Posts: 718
• Joined: 12-November 03

Posted 01 October 2006 - 08:47 AM

I know a lot of you have probably already done this, so i'm offering some very basic procedures to the un-initiated for creating a very basic WinPE 2.0 CD, sort of a beginners helper kit thing. This uses the same instructions that are available in the WAIK kit. This is for the x86 version, if your using x64 or AMD you will need to read the help .chm's for the information and then make the necessary changes in the attached .bat files.

1. Install the WAIK in either a WinXP or Vista environment. Don't change any of the default install locations or directory names.

2. I've created 8 small .bat files for you to use in this process to keep you from typing all the commands needed and making mistakes. They are attached to this post. I seperated them out into simple basic batch files so you could follow the process along and learn. Feel free to modify them to your hearts content but i'd recommend you use them as is for right now until you get up on the process. I've used some switches in the batch files to supress some prompts so you don't need to make decisions and can watch the process move along. When you have explored the help chm's in the WAIK and feel more comfortable with rolling your own, then make your own batch file changes. Unzip them to C:\Program Files\Windows AIK\Tools\PETools\....or somewhere else and then move them to C:\Program Files\Windows AIK\Tools\PETools\...they have to be in C:\Program Files\Windows AIK\Tools\PETools\

3. After you have put the batch files in C:\Program Files\Windows AIK\Tools\PETools\...go to Start - Programs - Microsoft Windows AIK - and click on 'Windows PE Tools Command Prompt'. The command prompt will open at 'C:\Program Files\Windows AIK\Tools\PETools' with all the necessary environment variables set up for you.

4. Next you need to make sure a directory called 'winPE_x86' DOES NOT ALREADY EXIST in the root of your C:\ drive. If it does you need to either move it somewhere else or delete it. This process assumes the target directory does not already exist and if it does the process will fail.

5. Now back to the 'Windows PE Tools Command Prompt', if everything else above has been done, type "step1.bat" without the quotes. When that step reports back that its done, then type "step2.bat". When that step reports back that its done, then type "step3.bat". Repeat for "step5.bat" ...etc... until you are have finally finished up with running "step8.bat". After each step is completed in the command prompt, you will know its completed when the cursor once again appears on the 'C:\Program Files\Windows AIK\Tools\PETools\' line in the command prompt, dont force it, wait for it. You must run these batch files in order, step1.bat, step2.bat, step3.bat, etc...don't run them out of order.

6. After all the batch files have been run (step1.bat to step8.bat) one at a time use explorer or My Computer to take a look in C:\winpe_x86. You will find an .iso there called 'winpe_x86.iso' almost 187 MB in size. Burn the 'winpe_x86.iso' to a regular CD with your favorite burning application. This iso is bootable, so there is no need to make the CD bootable in your burning application.

All the important tools are loaded to memory in this setup, so after you boot on this CD you can remove it and use things like ImageX to restore or make an image of a Vista install for backup or restore. You can use diskpart and format to prep a hard drive for an install, etc.... Putting these things in memory was a consideration for those who don't have two DVD/CD type drives for example and would need to restore an image from a DVD - you can take the WinPE boot CD out and put the DVD in with the image to be restored. It shouldn't use that much memory but you might notice the difference between 512 MB and 1 GB. The tools are loaded to ram drive X in memory. All you need to do is boot on the CD you created above. Everything is command line in a command prompt in winPE once you boot into it.

If you need help on a command in the WinPE command prompt after you boot on the CD you created, lets use ImageX as an example, simply type the command followed by '/?' i.e...Imagex /?.

I'm coding a nice GUI inteface for this process but its not ready yet. Hope this helps someone out.

#### Attached File(s)

This post has been edited by Spooky: 26 November 2006 - 11:09 AM

• ^^ Yes, that IS a Robin Reliant shuttle!
• Group: Members
• Posts: 336
• Joined: 23-March 05

Posted 01 October 2006 - 12:32 PM

Thanks alot for this. I've been looking at a PE build, but since it would only have been out of interest rather than to serve to real purpose, I didn't really look at the complex guides so it never really materialised.

This is a good way to start looking at it, thanks alot Spooky.

This post has been edited by Biohead: 01 October 2006 - 12:38 PM

### #3hj_fr

• Member
• Group: Members
• Posts: 142
• Joined: 09-August 04

Posted 04 October 2006 - 10:38 AM

Where to obtain the WAIK for Vista ?

### #4MagicAndre1981

• after Windows 7 GA still Vista lover :)
• Group: Patrons
• Posts: 5,018
• Joined: 28-August 05
• OS:Vista Ultimate x86
• Country:

Posted 05 October 2006 - 02:11 PM

go to connect.microsoft.com and subscribe for Business Desktop Deployment 2007 (Beta) for Windows Vista and the 2007 Microsoft Office system

### #5kev_147

• Junior
• Group: Members
• Posts: 99
• Joined: 23-February 06

Posted 07 October 2006 - 04:49 PM

does this pe disc have support for WSH & HTA?

Can you advise how you add $oem$ type folders to a PE disc, for example if i wanted to copy a diskpart batch file to the systemdrive

### #6fizban2

• Group: Super Moderator
• Posts: 1,900
• Joined: 14-April 05
• OS:Windows 7 x64
• Country:

Posted 07 October 2006 - 08:58 PM

kev_147, on Oct 7 2006, 04:49 PM, said:

does this pe disc have support for WSH & HTA?

Can you advise how you add $oem$ type folders to a PE disc, for example if i wanted to copy a diskpart batch file to the systemdrive

you can easily add WSH and HTA support, in the CHM files that come with the WAIK you can see how it is done with PEIMG, you actually don't have to add a $oem$ folder you can add your diskpart file to the system32 folder, that is what i did, or the programfiles folder. download the WAIK and read through the help files, you will find everything that your need

### #7Spooky

• Friend of MSFN
• Group: Members
• Posts: 718
• Joined: 12-November 03

Posted 10 October 2006 - 04:18 PM

Kev,

I didn't go that far with it. This is just a basic 'beginners' helper thing I tought might interest those just getting started and needing a little help. Although you could eaisly develop it into what you need by following the advice of fizban2 in the reply just above this one.

kev_147, on Oct 7 2006, 05:49 PM, said:

does this pe disc have support for WSH & HTA?

Can you advise how you add $oem$ type folders to a PE disc, for example if i wanted to copy a diskpart batch file to the systemdrive

### #8ideas

• Group: Members
• Posts: 341
• Joined: 29-January 06

Posted 19 October 2006 - 07:20 AM

this is new and tempting to tryout

### #9paxamime

• Newbie
• Group: Members
• Posts: 36
• Joined: 28-September 06

Posted 24 October 2006 - 06:55 PM

I have spent a large amount of time with PE 2.0 for a rather large IT company. In the spirit of sharing here are the scripts that I use to build my PE 2.0's.

First I start by creating a directory called PE in the root so it should look like this "C:\PE"

Download the BDD package from Microsoft's Connect web site. Which you can create a free account to obtain. Once the package is downloaded and installed there is an addition package that needs to be installed. This package is found in C:\Program Files\BDD 2007\WAIK\waikx86.msi Install it and then place the following scripts in C:\PE and follow the process of running the these scripts.

Go there and download the WAIK it is no longer included in the BDD file from connect.

1MakePE Directory.bat
rd /s/q c:\PE\winpe_x86

c:
cd "c:\program files\windows aik\tools\petools"
call copype.cmd x86 c:\PE\winpe_x86

pause


This will delete and re-create a directory called C:\PE\winpe_x86

2Mount.bat
cd \
cd c:\Program Files\Windows AIK\Tools\x86

imagex /mountrw c:\PE\winpe_x86\ISO\sources\boot.wim 1 c:\PE\winpe_x86\mount

pause


This mounts the boot.wim file which is the operating system itself and allows you to edit its settings. Anything you put in this mounted directory will be in the X:\ drive when the pe is booted. There is also a folder called ISO this is where you want files just on the CD but not in the mounted image.

3Packages.bat
cd \
cd c:\Program Files\Windows AIK\Tools\PETools\

peimg /install=WinPE-SRT-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-HTA-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-MDAC-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-Scripting-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-XML-Package c:\PE\winpe_x86\mount\Windows

::The packages have now been installed and will now be prepared.

pause


This installs the packages into the image which include HTA, MDAC, Scripting, XML and SRT. SRT is the recovery package which includes the System Recover applet.

4PrepareImage.bat
cd \
cd c:\Program Files\Windows AIK\Tools\PETools\

peimg /prep c:\PE\winpe_x86\mount\Windows

pause


This prepares your packages that were installed. This only needs to be done once unless you change the packages that are installed and does not do anything for any of the other data thats inserted into your mounted image.

5UnMount.bat
cd c:\Program Files\Windows AIK\Tools\x86\

imagex /unmount c:\PE\winpe_x86\mount /commit

pause


Once you are done changing the boot.wim OS file this will unmount the image.

6MakeISO.bat
cd \
c:
cd c:\Program Files\Windows AIK\Tools\PETools"

OSCDIMG -bc:\PE\winpe_x86\etfsboot.com -n -o c:\PE\winpe_x86\iso c:\PE\winpe_x86.iso

pause


Winpeshl.ini
[LaunchApp]
AppPath = %SYSTEMDRIVE%\NU2\nu2.exe
[LaunchApps]


This one is actually placed in the mounted \Windows\System32 directory and is the shell that is launched once its booted into PE. The nu2 line that is in there is not the shell that I use for my company but it is a good easy to modify shell which is why BartsPE uses it.

I personally dont like the "Hit any key to boot off CD" prompt and if your the same way go into the c:\PE\winpe_x86\ISO\boot\ and delete "BOOTFIX.BIN". Which will bypass the hit any key option and the system memory diagnostic menu.

Thats it! Pretty simple once its layed out. There are varying ways to do this same process and differences of opinions on ways to do each different part but this is the way that works for me.

#### Attached File(s)

•  PE.rar (1.14K)

This post has been edited by paxamime: 09 January 2007 - 03:40 PM

### #10sachinpatole

• Group: Members
• Posts: 1
• Joined: 25-September 06

Posted 26 October 2006 - 11:46 PM

I have created the Win PE 2.0 image using the same procedure.
We can also install WMI(Windows Managements Instrumentation) using the following cmd.

peimg /install=WinPE-WMI-Package c:\PE\winpe_x86\mount\Windows

What is the minimum system RAM required to boot a system using WinPE 2.0 ?

Thanks,

paxamime, on Oct 24 2006, 06:55 PM, said:

I have spent a large amount of time with PE 2.0 for a rather large IT company. In the spirit of sharing here are the scripts that I use to build my PE 2.0's.

First I start by creating a directory called PE in the root so it should look like this "C:\PE"

Download the BDD package from Microsoft's Connect web site. Which you can create a free account to obtain. Once the package is downloaded and installed there is an addition package that needs to be installed. This package is found in C:\Program Files\BDD 2007\WAIK\waikx86.msi Install it and then place the following scripts in C:\PE and follow the process of running the these scripts.

1MakePE Directory.bat
rd /s/q c:\PE\winpe_x86

c:
cd "c:\program files\windows aik\tools\petools"
call copype.cmd x86 c:\PE\winpe_x86

pause


This will delete and re-create a directory called C:\PE\winpe_x86

2Mount.bat
cd \
cd c:\Program Files\Windows AIK\Tools\x86

imagex /mountrw c:\PE\winpe_x86\ISO\sources\boot.wim 1 c:\PE\winpe_x86\mount

pause


This mounts the boot.wim file which is the operating system itself and allows you to edit its settings. Anything you put in this mounted directory will be in the X:\ drive when the pe is booted. There is also a folder called ISO this is where you want files just on the CD but not in the mounted image.

3Packages.bat
cd \
cd c:\Program Files\Windows AIK\Tools\PETools\

peimg /install=WinPE-SRT-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-HTA-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-MDAC-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-Scripting-Package c:\PE\winpe_x86\mount\Windows

peimg /install=WinPE-XML-Package c:\PE\winpe_x86\mount\Windows

::The packages have now been installed and will now be prepared.

pause


This installs the packages into the image which include HTA, MDAC, Scripting, XML and SRT. SRT is the recovery package which includes the System Recover applet.

4PrepareImage.bat
cd \
cd c:\Program Files\Windows AIK\Tools\PETools\

peimg /prep c:\PE\winpe_x86\mount\Windows

pause


This prepares your packages that were installed. This only needs to be done once unless you change the packages that are installed and does not do anything for any of the other data thats inserted into your mounted image.

5UnMount.bat
cd c:\Program Files\Windows AIK\Tools\x86\

imagex /unmount c:\PE\winpe_x86\mount /commit

pause


Once you are done changing the boot.wim OS file this will unmount the image.

6MakeISO.bat
cd \
c:
cd c:\Program Files\Windows AIK\Tools\PETools"

OSCDIMG -bc:\PE\winpe_x86\etfsboot.com -n -o c:\PE\winpe_x86\iso c:\PE\winpe_x86.iso

pause


Winpeshl.ini
[LaunchApp]
AppPath = %SYSTEMDRIVE%\NU2\nu2.exe
[LaunchApps]


This one is actually placed in the mounted \Windows\System32 directory and is the shell that is launched once its booted into PE. The nu2 line that is in there is not the shell that I use for my company but it is a good easy to modify shell which is why BartsPE uses it.

I personally dont like the "Hit any key to boot off CD" prompt and if your the same way go into the c:\PE\winpe_x86\ISO\boot\ and delete "BOOTFIX.BIN". Which will bypass the hit any key option and the system memory diagnostic menu.

Thats it! Pretty simple once its layed out. There are varying ways to do this same process and differences of opinions on ways to do each different part but this is the way that works for me.

### #11ElAguila

• Member
• Group: Members
• Posts: 109
• Joined: 22-October 06

Posted 02 December 2006 - 05:59 PM

Thanks for this wonderful guide. I was trying to do that myself and just wasn't able to until I got your bat files. Do you know if it is possible to slipstream drivers into the this pe like you could with the pe from the xp disc?

This post has been edited by ElAguila: 02 December 2006 - 06:35 PM

### #12Jazkal

• Senior Member
• Group: Members
• Posts: 592
• Joined: 16-January 04

Posted 03 December 2006 - 08:05 AM

ElAguila, on Dec 2 2006, 06:59 PM, said:

Thanks for this wonderful guide. I was trying to do that myself and just wasn't able to until I got your bat files. Do you know if it is possible to slipstream drivers into the this pe like you could with the pe from the xp disc?

While you still have the WinPE2 wim file mounted, run this command:

%PETOOLS%\peimg.exe /inf:%DRIVERINF% %MOUNTROOTDIR%\Mount\Windows

### #13ElAguila

• Member
• Group: Members
• Posts: 109
• Joined: 22-October 06

Posted 03 December 2006 - 09:53 AM

Jazkal, on Dec 3 2006, 09:05 AM, said:

While you still have the WinPE2 wim file mounted, run this command:

%PETOOLS%\peimg.exe /inf:%DRIVERINF% %MOUNTROOTDIR%\Mount\Windows

I tried that but the raid driver that I am trying to slipstream uses a txtsetup.oem file. I tried it after step 3 and after step 4 but I got the same error. If I use the /inf and put the path I get the following error:

Installing INF package: e:\sil

PEIMG failed to complete the operation with status code 0x800f0003.

This post has been edited by ElAguila: 03 December 2006 - 09:54 AM

### #14Jazkal

• Senior Member
• Group: Members
• Posts: 592
• Joined: 16-January 04

Posted 03 December 2006 - 06:09 PM

that error message looks like you gave it the folder and not the inf file.

a full example of a correct command line:

"C:\Program Files\Windows AIK\Tools\PETools\peimg.exe" /inf:e:\Sil\name.inf C:\PE2\Mount\Windows

is that what you used?

All mass storage device drivers should come with a txtsetup.oem file, but this command requires a .inf file.

This post has been edited by Jazkal: 03 December 2006 - 06:10 PM

### #15ElAguila

• Member
• Group: Members
• Posts: 109
• Joined: 22-October 06

Posted 03 December 2006 - 06:13 PM

You are absolutely correct. I gave it the folder path and not the actual file.

### #16ElAguila

• Member
• Group: Members
• Posts: 109
• Joined: 22-October 06

Posted 03 December 2006 - 11:25 PM

I was able to get the drivers slipstreamed. I have been reading the help files but I have a couple of questions and I was wondering if anyone could help me out. First, what is a good shell to use with PE 2.0? I have been trying to get explorer to work but with no luck so far. Also how do I enable the network so that I can map a drive and dump an image to it?

UPDATE:
I was able to access all of my raid drives and the got the network driver working. Just before using the /prep command I copied over my Opera folder, Nu2Menu, and A43 and Totalcommander. All of these items run in PE 2.0. Now as I am not familiar with nu2menu I need to read up on how to edit the nu2menu.xml file so I can opera, a43 and TC to the menu. If I have time I am going to try to write a small gui for the imagex program using either vb or .net.

This post has been edited by ElAguila: 04 December 2006 - 12:51 AM

### #17Jazkal

• Senior Member
• Group: Members
• Posts: 592
• Joined: 16-January 04

Posted 04 December 2006 - 08:18 AM

Here is an autoit3 GUI script for ImageX: ImageXGUI

### #18Beta4Me

• Newbie
• Group: Members
• Posts: 27
• Joined: 29-November 05

Posted 09 December 2006 - 03:44 PM

hj_fr, on Oct 5 2006, 02:38 AM, said:

Where to obtain the WAIK for Vista ?

But now this link doesn't work.

### #19Paraglider

• Newbie
• Group: Members
• Posts: 35
• Joined: 21-August 05

Posted 11 December 2006 - 06:48 AM

### #20Beta4Me

• Newbie
• Group: Members
• Posts: 27
• Joined: 29-November 05

Posted 17 December 2006 - 07:08 PM

Paraglider, on Dec 11 2006, 10:48 PM, said:

Thank you!