How to extract Windows PE from Longhorn
Note! I used a system which had Windows XP installed on it.
- First we are going to make some preparations:
- create a folder on your hard drive example "LonghornPE"
- In here we are going to create a subfolder called "i386"
We will now start the Longhorn installation:
- Click on "Start - Run" - and type "Your Longhorn Installation Files location\setup.exe /noreboot"
Longhorn will start the installation, asking serial etc...
Just follow the instructions of the wizard.
- When finished, go to your explorer, and to the root C:\
Here you will find 2 folders with $ in front of it. If not, change explorer settings to view hidden files and folders.
The one we need is the "$Windows.~bt" folder.
Copy the whole contents (Folders and files) of this folder, to the "i386" folder you created at the beginning.
- Now search for a file called "bootsect.dat" on in the root c:\ and delete it.
- From your Longhorn Installation Files Location, copy the following files to the newly created "LonghornPE" folder:
Readme.htm, win51, win51ip and winbom.ini
- Next go to the "txtsetup.sif", open it with notepad, search for "BootPath" and delete this line. Close editor, and save.
- To enable networking you will have to edit "Startnet.cmd" in the LonghornPE\i386\system32 folder.
delete: factory –winpe
Add: regsvr32 /s netcfgx.dll
netcfg -v -winpe
net start dhcp
net start nla
- Open "regedit" on your windows XP machine, and navigate to HKEY_LOCAL_MACHINE.
Click on “File – Load hive…”
and browse to the “setupreg.hiv” in your LonghornPE i386\system32 folder, you created earlier.
Here “c:\LonghornPE\i386\system32”. Give it a name and load it by hitting OK.
Inhere navigate to the “setup” key, double click on the “CmdLine” string (right window) and enter the value
“cmd.exe /k Startnet.cmd” (without the quotes) and click OK.
Next click on de key “LonghornPE” once go to “File – Unload Hive…”
Note: If you don't want the "Startnet.cmd" to run, you can leave it away, and just enter "cmd.exe /k"
This will only start the command prompt. Or if you have your own command to start, copy the command you created to the system32 folder, and add it to the value, similar to "cmd.exe /k YourOwn.cmd"
Now the most important thing!!!!!!
Cleaning up your PC. Do not forget this step!!!!!!!!!
On your root drive c:\ you should see a “boot.ini” and a “boot.bak” file.
Delete or rename the “boot.ini” to “boot.old” and rename “boot.bak” to “boot.ini”.
(check if the boot.ini has the correct attribute = read only)
Next delete both folders on your root drive c:\
"$WINDOWS.~BT" and "$WINDOWS.~LS"
search on your root drive c:\ (not subfolders) for “$LDR$” and “txtsetup.sif” and delete them.
- the last step is creating an iso file from your LonghornPE.
- You need a valid Windows XP boot image, and an iso file creator, such as CDImage. Also all attributes from all files must be removed (-h –r)
Could be done with a job
Example: attrib -R -H C:\LonghornPE /S /D
Create your ISO. Have fun!
Here to give you an idea of directory structure.
Other tips are:
How to Slipstream Windows XP
How to create a Bootable CD (after slipstreaming)
How to create your own plugin
How to create an iso file with Bart's PEBuilder
How to change the Bootscreen of Windows XP
Any remarks or suggestions, just let me know