PEBuilder-XPE

Windows XP Preinstalled Environment (PE-Builder + XPE Plugin)

[SinglePic not found]

PE-Builder – version 3.1.10a
From Bart Lagerweij

Windows XPE plugin – version 1.0.6
AutoRamDiskResizer – version 1.9
Build Scripts – version 20050322
From Gianluigi Tiesi

HwPnP plugin – version 1.0.0.22
From Paraglider

: : Introduction
: : What is PE-Builder
: : What is Windows XPE
: : What is Build Scripts
: : What is Auto Ramdisk Resizer
: : What is HwPnP
: : Downloads
: : Starting Building steps
: : Adding Windows XPE Plugin
: : Windows XPE with Windows 2003
: : Adding XPE Password
: : Adding the HwPnP Plugin
: : Adding the Auto Ramdisk Resizer
: : Closing Building steps

Introduction

I am participating in a maintenance group that is responsible for maintaining ± 550 servers and ± 7000 workstations. To relieve this job we are looking for the ultimate rescue disc which most meets to the following requirements;

  • Support all kind of hardware (brand, type en configurations)
  • Most comply to the utility software witch we are using (imaging, back-up/restore enz..).
  • The possibility to use network options (DNS, DHCP enz…)
  • Easy to use.

In are search we come to a solution in the following combination;

What is PE Builder?

Bart’s PE Builder helps you build a “BartPE” (Bart Preinstalled Environment) bootable Windows CD-Rom or DVD from the original Windows XP or Windows Server 2003 installation/setup CD, very suitable for PC maintenance tasks.

It will give you a complete Win32 environment with network support, a graphical user interface (800×600) and FAT/NTFS/CDFS file system support. Very handy for burn-in testing systems with no OS, rescuing files to a network share, virus scan and so on. This will replace any Dos boot disk in no time!

PE Builder is not a Microsoft product and does not create Microsoft Windows Preinstallation Environment (“WinPE”). Using PE Builder does not grant you a license to Microsoft WinPE or to use the Windows XP or Server 2003 binaries in a manner other than stated in the End-User License Agreement include in your version of Microsoft Windows XP or Windows Server 2003. Microsoft has not reviewed or tested PE Builder and does not endorse its use.

Please do not contact Microsoft for support on the preinstallation environment that has been created by PE Builder!
Microsoft does not provide support for PE Builder or for the preinstallation environment created by PE Builder.

The PE Builder program (pebuilder.exe) runs on Windows 2000/XP/2003. It does not run on Windows NT4/ME/9x.

To avoid any confusion, the bootable media’s generated by PE Builder should be called by it’s nickname “BartPE”!

PE Builder changes (from v3.1.9 until v3.1.10)

Boot BartPE on a system with 64MB

to keep a separate CD (nickname “SmallPE”) for this. This CD did not have a ramdrive and some other plugins, so that it would boot on those old 64MB systems. Not anymore! Thanks to an updated nu2menu and a little ramdisk parameter tuning, you can use the same BartPE CD also for 64MB system. Of course this does not include huge and hungry plugins like xpe and so…

Supported languages

PE Builder currently supports the following languages:
english*, dutch*, czech*, german*, japanese*, russian*, slovak*, arabic,brazilian, chinese_chs, chinese_traditional_bg5, french, greek, italian,macedonian, polish, portuguese, romanian, spanish and turkish.
(*) Help pages are also available.

Pre-Flight check

This is a first attempt to check if all files required to boot BartPE exist in the output location. At current a warning message is printed if a file is missing.

See below for more details…

Changes to pebuilder.exe:

  • Added an error and warning counter on build dialog.
  • Added a value of 8 to SourceDisksFiles attribute. This will rename the filename to uppercase.
  • Uppercasing windows files is only done, when an ISO image is build.
  • Added an option where you can disable uppercasing the windows files.
  • The output directory was created in uppercase, while this is not needed. Fixed it.
  • Added a routine that, after building, checks if files required for booting BartPE are missing from the output directory. Prints warning messages if files are missing.
  • Added a parser variable @Lcid@, which expands to the system default language identifier (for example “409″).
  • Added an option to erase the ISO image and the output folder after succesfull CD burn.
  • When burning using starburn, only devices capable of writing to CD or DVD are shown in the device listbox. Also when no device is selected PE Builder will select the best device for you.

Changed items:

  • Pebuilder.inf: Removed olethk32.dll from KnownDLLs. W2k3 SP1 will crash if the NTVDM.EXE is stored in i386system32 with the above RegKey. This happens for example with the dospe plugin. In W2k3 the olethk32.dll doesn’t exist in the KnownDll List.
  • Pebuilder.inf: bootfont.bin is now also copied. Mainly used in non-english languages. It uses the new sourcedisksfiles attribute value of 8 to uppercase the file in ISO images.
  • Nu2shell.exe: v1.3, the environment variables USERPROFILE and ALLUSERSPROFILE where not set correctly (in fact they where erased). Fixed.
  • Pluginstinger: updated to work with new stinger filenames like “stng259.exe”.
  • Pluginirfanview: added “files” folder.
  • Pluginramdisk: updated ramdisk.inf. Now the ramdisk switches to 4MB in size when the system is low on memory. Normally systems with 90MB or less will end up with a 4MB ramdisk. This enables you to run your normal BartPE CD on system with only 64MB of memory.
  • Pluginnu2menu: updated nu2menu.exe to v0.3.52. Nu2menu was running out of memory a bit fast on systems with very little memory (<64MB). Fixed memory allocation bug.
  • Plugintotal commanderwincmd.ini, Small83Names=0
  • Updated the following languages files:
  • langenglish.lng: updated, the following language numbers: 288-293
    • langdutch.lng
    • langchinese_chs.lng
    • langczech.lng
    • langdutch.lng
    • langenglish.lng
    • langfrench.lng
    • langgerman.lng
    • langgreek.lng
    • langitalian.lng
    • langmacedonian.lng
    • langpolish.lng
    • langromanian.lng
    • langslovak.lng
    • langspanish.lng
  • Updated the following help files:
    • helpenglishpluginformat.htm, added help for SourceDisksFiles attribute value 8.
    • helpdutchpluginformat.htm

Added items:

  • – Added the following languages:
    • langarabic.lng
    • langbrazilian.lng
    • langchinese_traditional_bg5.lng
    • langjapanese.lng
    • langrussian.lng
    • langportuguese.lng
    • langrussian.lng
    • langturkish.lng

BartPE vs. Windows PE?

  • BartPE is not supported by Microsoft. Windows PE is an official Microsoft product.
  • BartPE has a graphical user interface. Windows PE has a command line interface.
  • The tools needed to make a BartPE installation are free software. Windows PE is available only to Microsoft OEM users.
  • BartPE allows unlimited custom plugins. Windows PE has a limited range of plugins options.

What is the technical difference between BartPE and Windows PE?

  • Target – Microsoft sees Windows PE as an installation platform. Bart sees Windows PE as the next generation rescue platform.
  • Build from – Bart’s builder can also build from Windows XP Home Edition or from a preinstalled Windows XP version (without CD).
  • Plugins – With PE Builder you can easily add applications, drivers or tools using plugins. This makes PE Builder extremely powerful. The end user can even combine plugins from different software vendors into one CD image.
  • Network support – PE Builder includes its own network support tools (bartpe/penetcfg) to start TCP/IP and Microsoft Client. The TCP/IP settings like: dynamic/static ip-address, subnet-mask, default gateway, dns-servers computer-name, workgroup can be changed on-the-fly. You can create pre-defined profiles, that you can select. Microsoft Windows PE only supports DHCP or fixed settings using winbom.ini. Also there is a plugin (NwDskPe) created by Erwin Veermans that loads the Netware Client on BartPE (IP/IPX).
  • Fileshare – BartPE can start File Sharing support so you can connect to the system through a share.
  • VNC – Because of the File Sharing support you can also run UltraVNC.
  • Dos support – Bart’s builder has a plugin called “dospe”.
  • License – Microsoft Windows PE is only for Enterprise/OEM customers (see previous), BartPE is for everybody!
  • 64-Bit – Bart’s builder does not support Windows 64-bit editions.
  • Start-menu – Bart’s builder gives you a simple, dynamic and powerful start-menu. Microsoft’s builder does not give you a start-menu, it uses a command prompt.

Requirements to build

  1. The files from your Windows Installation CD-Rom. Supported Windows versions are:
  • Windows XP Home Edition (must be slip streamed with Service Pack 1 or higher)
  • Windows XP Professional (must be slip streamed with Service Pack 1 or higher)
  • Windows Server 2003, Web Edition
  • Windows Server 2003, Standard Edition
  • Windows Server 2003, Enterprise Edition
  1. PE Builder runs on Windows 2000/XP/2003/BartPE systems.
  2. CD/DVD writer if you want to creat a bootable CD/DVD.

What is Windows XPE

The Windows XPE plugin is Gianluigi Tiesi attempt to make BartPE closer to Windows XP (XP + PE = XPE), it’s almost localized, tell hem if some “important” stuff is not inculded. The plugin is currently splitted for better customization/implementation.

Version 1.0.4

For license, changelog, bugs and todo look at Readme.html file

Note this plugin is updated for Windows XP SP2, so I don’t assure compatibility with SP1
Windows XPE – Main plugin: contains explorer/internet explorer stuff

To use PeNetCfg for the network configuration, read instructions in z_xpe-custom

  • Windows XPE – Main plugin: contains explorer/internet explorer stuff
  • Windows XPE – Crypto module: to add https support to ie and handle secure certs
  • Windows XPE – Defaults: contains default values if uncustomized
  • Windows XPE – DirectX: DirectX Support
  • Windows XPE – Help System: .chm/.hlp files
  • Windows XPE – MMC: working modules are Disk Manager, Defrag, Hardware Manager, EventLog
  • Windows XPE – PnP & Multimedia: audio/video/directx and media player – partially usb (hotplug works bad)
  • Windows XPE – Windows Media Player 9: Windows Media Player 9 and mplayer6 (wmp6), also support for wmp9 skins
  • Windows XPE – WMI: Now working but needs some time to create Repository (disabled by default)
  • Windows XPE – Customizations: most of customizable and visual stuff, you should edit this file to change xpe look (rename it to z_xpe-custom.inf)

Please Note: This plugin will work ONLY with Windows XP SP2 and Windows Server 2003 SP1, I cannot retain previous service packs compatibility since there is no way to apply different actions for different service packs.

NOTE Important: you should DISABLE Startup Group and PELoader/Nu2Shell plugins if you run XPELogon as the shell (Default configuration, BTW XPE provides same features).

WMI Notice: The wmi plugin creates the wbem Repository in %temp%Repository (most likely a ramdrive), this process is a bit slow, but you can speedup it, just build an xpe with wmi, then copy Repository directory from winpe %temp% drive into xpe plugin directory, on the next xpe build yout will have Repository directory on the cdrom and xpe will not rebuild it at runtime. This also will reduce ram usage by about 7 mb, but computer name will be hardcoded in all wmi stuff.

This plugin needs ramdisk enabled to work, also note my ramdisk autoresizer plugin needs itself ramdisk plugin, also you need pebuilder >= 3.0.24

In order to use PnP plugin you need updated InfCacheBuild or Paraglider updateinfs to remove CopyFiles stuff from inf files, you can use my wrapper for hd install patch. Create following directories inside xpe plugin: inf,drivers,system32 and copy needed files. Also you need updated AutoRamResizer version 1.4 if you want to resize ramdisk at runtime

History

Changes within version 1.0.6

  • Bug fix only
  • Fix crash in xpeinit -w, spotted in vs2005 build (I was writing to a read-only memory area)

Changes within version 1.0.5

  • Build binaries with vs 2005
  • Corrected grammar of xpe.htm, thx to Ross Smith II
  • Added ddraw.dll to xpe-directx as suggested by FeReNGi
  • Look for emptyregdb.dat in host Windows installation, tip from cdob
  • Removed association for jar to Compressed folder, tip from ceroni

Changes within version 1.0.4.

  • Added a distribution grant notice in the readme (for cdroms/magazines)
  • XPELogon: added -x option to avoid integrity checks (Registration dir / shell32 locale mismatch)
  • Moved crazy copy bug workaround in z_xpe-custom.inf and added an info in the help
  • Added udfs support (untested) – cdob
  • Removed Help Support menu, replaced with favorites, users like much more this
  • XpeShutdown doesn’t overwrite anymore PostBootReminder key, anyway PostBootReminder key is deleted by XPEinit
  • XpeShutdown: fixed W2k3 SP1 problem by adding a fake DllGetClassObject
  • W2k3 SP1 doesn’t freezes explorer anymore when right click on desktop/taskbar (microsoft fixed the bug)
  • Disable by default tray eject stuff on W2k3 since it doesn’t work, also xpelogon crashes when ok button of the Eject Media error is pressed
  • Fixed syntax errors by using Shadrach tool
  • Added a check in pegina (to be sure) as suggested by paraglider
  • XPELogon: added NoProcessKill and NoStopServices keys to skip stop of process/services
  • XPELogon: added password lock, call XPELogon -5 your_password, and the md5 hash kill be generated and copied into your clipboard, you must add the value in the correspective z_xpe-custom.inf setting
  • PELogon: Really kill processes after sending WM_CLOSE and WM_DESTROY (skipping winlogon.exe, smss.exe, csrss.exe, lsass.exe, services.exe, svchost.exe)
  • Fixed rpc service on W2k3 SP1 – thx to goldfinger
  • Added a note in xpe.htm explaining to avoid entries like %FILE_FOLDER% in explorer using W2k3 SP1 (pebuilder bug)
  • Added laptop battery files, I couldn’t test it, so send me feedbacks
  • WMI Support for W2k3, the pre-made Repository directory should be named Repository-w2k3
  • Added Context Services menu to My Computer
  • Fixed chinese locale it was traditional not simplified also added missing translations strings – thx to BrianLee
  • XPELogon: added different handling for password lock, now it’s possible to lock xpe depending on media that starts xpe look in z_xpe-custom.inf
  • Included some settings from reatogo
  • Removed some themes related files, until themes are not working they are only wasting space

Comming up (things to do)

  • Apply, File Properties are not localized
  • msdxm.ocx does not register correctly
  • Fix default mixer settings
  • Fix eject on w2k3 (postponed until new infos)
  • Set IE home page in w2k3, ie4uinit.exe resets it to the admin page
  • Fix wmp9 skin download in ie (opening in explorer works)
  • Fix “first time” osvc – usb storage hotplug without patching usbhub.sys
  • Add a section in xpe.htm explaining some tips to avoid very slow xpe builds
  • Add appdata variable at runtime, it’s only possible if issued by xpeinit and with xpelogon -e enabled
  • Fix reg.exe + xpeinit on xpe-wmp.inf
  • USB Storage no more working? XPE bug or something changed in vmware 5? – !!!Regression!!!

What is Build Scripts

A set of PEBuilder scripts, includes a wrapper and InfCacheBuild witch will be put into PEBuilder directory. Edit wrapper.cmd to change your options:

_volid is the title of the Image.
_sortfile to pass to mkisofs for sorting order of files, I’ve tracked down a possible order (xpe optimized), but you can use your own.
_mkisofspriority can be low | normal | high | realtime | abovenormal | belownormal, the priority for mkisofs process.
_runinfcache if yes the script will call InfCacheBuild, it will remove CopyFiles, RenFiles and DelFiles sections from inf files,
then it will build INFCACHE.1 to speedup pnp detection, also if filecase.ini is included it uppercases files from
this file and it will add -U option to mkisofs so you will not get all files on Image in uppercase but only needed.
_copyhives if yes the script will copy registry hives for hdinstall, you should also edit pluginpeinstpeinst.cmd and add:
copy /y %_source%programspeinstdefault %_target%minintsystem32config >NUL:
copy /y %_source%programspeinstsoftware %_target%minintsystem32config >NUL:
before line saying “PEINST: Installation completed…”.
_setupisolinux if yes it will copy isolinux directory in the Image, also will setup needed mkisofs options, a sample config
togheter with base files is included.
_mkisofs set this to no only for debug, it will prevent mkisofs call.

NOTES:
- don’t press stop button while mkisofs is running or you will need to kill it by hand (taskmanager) or wait its end.
– if sortfile doesn’t exists -sort option will not be used
– if filecase.ini is processed and no errors (except not found) occur, then -U option is added to mkisofs

Sources (GPL) for InfCacheBuild program can be found on my winpe page: http://oss.netfarm.it/winpe/

What is Auto Ramdisk Resizer

AutoRamDisk resizer: base concept by Sergio Neddi, C-Native port by Sherpya, you need also Ramdisk plugin active since this does only the resizing

To format the ramdrive with NTFS compressed filesystem after the resize, uncomment the reg key in autoramresizer.inf
Usage:
AutoRamResizer.exe [-w] [-d n] [-l min] [-h max] [-f minfree]

-w wipe ramdrive before processing it
-d divisor – the divisor (decimal) for physical ram to calculate new size, defaults to 3, must be > 1
-l minimum – the minimum ram size to set, defaults to 4mb
-h maximum – the maximum ram size to set, defaults to physical memory / divisor
-f minfree – the minimum free memory after the resize

-l -h -f accept megabytes as arguments
Note: If you are not using xpe but another explorer plugin, you should change this line:

0×1,”MicrosoftWindowsCurrentVersionRunOnceEx100″,”100″,”||xpeinit.exe -f -m AutoRamResizer AutoRamResizer.exe -h 64 -f 64″

with this:
0×1, “MicrosoftWindowsCurrentVersionRunOnceEx100″,”100″,”||AutoRamResizer.exe -h 64 -f 64″

What is HWPnP.

This plugin is used to detect and install devices which currently have no driver installed. This plugin is used by the Windows XPE plugin.

By default it will install devices with device ids that start with:

  • PCIVEN
  • ACPI_HAL
  • ACPI
  • IDE
  • PCIIDE
  • ISAPNP
  • LPTENUM
  • ROOTACPI
  • ROOTDMIO
  • ROOTSYSTEM
  • SERENUM
  • STORAGE
  • SW
  • USB
  • USBSTOR

If the installation of a device results in the popup of the ‘Found New Device’ dialog then the and buttons will automatically be clicked so that no user intervention is required for device detection to continue. The buttons are identified in the dialog by looking for controls with particular control ids so hopefully this will work in all languages. Its only been tested in US english.

Downloads

Here is the latest version of PE-Builder:
PE Builder v3.1.10

Here is the latest version of the XPE Plugin and other tools from Sherpya:
Windows XPE Plugin v1.0.6
AutoRamDiskResizer
Build Scripts

Here is the latest version of the HWPnP Plugin:
HWPnP 1.0.0.22

Starting Building steps

  • Download the latest version of PE Builder and Windows XPE Plugin, see the Download section on this page.
    Just unpack the PE Builder files from the zipfile to some location you like. Copy also the Windows XPE plugin files in the plugin directory of PE Builder.
    Make sure you also unpack the subdirectories!
  • Run pebuilder.exe. Follow the instructions that PE Builder gives you. If some option is not clear hit the Help button.
    Some plugins require that you download the program and put the files in the right location. PE Builder will tell you so. For example, if you enabled a plugin, without adding the required files, PE Builder will display an error message saying Missing files: file1, file2, …. If this happens hit the [PluginHelp] button to get more information about what files are needed.

Adding Windows XPE Plugin

This plugin (together with the HWPnP plugin) is the best combination for a PnP working rescue CD. To let it work for the 100%, you must add four directories (DRIVERS, INF, SYSTEM, FILES). This information you don’t find in de manuals but it work for me. For some people is this a brute force to use this kind of solution, but it’s work with all kind of hardware.

You don’t need the driver, inf and system folder you can also add all your hardware as a separate plugin. The three sub folder are there to make it 100% plug and play for many hardware configurations and AGAIN you only add the three directories if you are NOT sure about the miscellaneous range of hardware configurations.

I often leave these directories away for testing (for example PXE Boot) and everything works fine for that specific hardware.

[SinglePic not found]

  • You can find the driver.cab and sp*.cab file’s in the i386 directory on the installation CD (including SP2 slipstreamed). Or if the i386 directory is copied to the hard disk you can find it in there.

NOTE: you must update the drivers that you extract from driver.cab with the ones from sp1.cab or sp2.cab depending on which service pack you use. The service pack files update some of the existing drivers but not all of them. (from Paraglider).

  • Expand all inf files from XP source by running the following command from commando prompt or run box.

Command prompt or startrun;

expand -r “[xpi386 path]*.in_” ["XPE plugininf sub folder path"]

Delete the expanded .inc .ins and .ini files in the xpeinf subfolder. Just leave .inf files.

  • OPTIONAL: Download Tweakui (for Windows 9x and Windows XP) from www.systemsmedic.com. Uncompact this and put tweakui.exe and tweakui.cpl in the files directory.
  • Rename the z_xpe-custom.inf.sample file to z_xpe-custom.inf and edit the files z_xpe-custom.inf and xpe-defaults.inf to your needs.
  • NOTE Important: you should DISABLE Startup Group and PELoader/Nu2Shell plugins if you run XPELogon as shell (Default configuration, btw xpe provides same features).

Windows XPE with Windows 2003

Windows 2003 server also works with the PXE plugin, but some stuff could not work as expected. Please note on Windows 2003 SP1, you will have some file type names not currently named, they appears like %FILE_FOLDER% or similar. The problem is in hivecls.inf file, this has two [Strings] sections, and pebuilder (since 3.1.3) doesn’t support multiple [Strings] sections. To fix this you should manually edit hivecls.inf file (in i386 of source directory), go at the end of the file to find the following lines.

[Strings] Remove.
FilePathMSHTA=”%SystemRoot%system32mshta.exe” Move to the second [string] section.

you must move FilePathMSHTA line into the second [Strings] section, then remove the first [Strings] identifier (line).

new hivecls.inf

EXCEL_4_CHART_FILE=”Excel 4 Chart File”
EXECUTABLE_FILES=”Executable Files”
FILE_FOLDER=”File Folder”
FILE_SYSTEM_ATTRIBUTES=”File system attributes”
FilePathMSHTA=”%SystemRoot%system32mshta.exe”
FOLDER=”Folder”
FOLDER_REDIRECTION_EDITOR=”Folder Redirection Editor”
FONT_FILE=”Font file”
FONTS=”Fonts”
GCCPL_DEFAULT=”Game Controllers CPL Shell Extension Default Property Sheets”
HANG__UP=”Hang &up”
HELP_FILE=”Help
File” HYPERTERMINAL_ICON_EXT=”HyperTerminal Icon Ext”

etc…

Adding XPE Password

Sherpya has create a solution to add a password on your Windows XPE disc. Run from the command promt the following command to generate your hash, the value will be copied in your clipboard.

xpelogon.exe -5 your_password

Check the following line’s into your xpe-custom.inf

;0×1,”SherpyaXPEinitProxy”,”Exclusion”,”localhost,;127.0.0.1;”
;0×1,”SherpyaXPEinitProxy”,”AutoUrl”,”http://www.mydomain.com/config_url”
; Setup Internet Explorer Proxy
;0×1,”MicrosoftWindowsCurrentVersionRunOnceEx900″,”160″,”||xpeinit.exe -p”

; XPELogon password lock, generate your hash using xpelogon.exe -5 your_password, the value will be
; copied in your clipboard, then paste it here, uncommenting the line.
; As example “{Copy the md5 hash from your clipboard}” is the md5 hash for “Sherpya”,without quotes
0×1,”SherpyaXPELogon”,”Password”,”{Copy the md5 hash from your clipboard}

; Disable password check for a specific boot media, i.e. setting CDLock to 0 will disable
; password prompt when it boots from a cd but net and hdd will be enabled
; The default is all to 1, password check for all media (only if above Password option is enabled)
;0×4,”SherpyaXPELogon”,”HDDLock”,0×0
;0×4,”SherpyaXPELogon”,”CDLock”,0×0
;0×4,”SherpyaXPELogon”,”NetLock”,0×0

; XPELogon Coordinates
;0×4,”SherpyaXPELogon”,”XPos”,0×70
;0×4,”SherpyaXPELogon”,”YPos”,0×50

How to create XPE menu entries.

How to put icons in the start menu root by editing the z_xpe-custom.inf.sample file
Do it like the example

Example
[Software.AddReg]
0×2,”SherpyaXPEinitStartMenu”,”Internet Explorer”,”%SystemRoot%iexplore.exe”

How to put icons in the Desktop
Do it like the example

Example
[Software.AddReg]
0×2,”SherpyaXPEinitDesktop”,”Command Prompt”,”%comspec%”

How to put icons in the Programs Menu
Doit like the example

Example
[Software.AddReg]
0×2,”SherpyaXPEinitPrograms”,”Calculator”,”%SystemRoot%system32calc.exe”

How to put icons in the Send To Menu
Doit like the example

Example
[Software.AddReg]
0×2,”SherpyaXPEinitSendTo”,”Wordpad”,”%SystemRoot%system32wordpad.exe”

How to create a subdirectory in the menu
This is a submenu caled Accessories in the Programs menu

Example
[Software.AddReg]
0×2,”SherpyaXPEinitPrograms”,”AccessoriesCalculator”,”%SystemRoot%system32calc.exe

Adding the HwPnP Plugin

Copy HwPnP.Exe and HwPnP.Dll files from the HwPnP plugin (HwPnP.cab) to the SYSTEM directory of the XPE plugin directory. The XPE plugin directory use the file automaticly. Place also this HwPnP plugin also as a normal plugin in the plugin directory of PE-Builder.

Adding the Auto Ramdisk Resizer

Add this as a normal plugin to the plugin directory of PE-Builder and change the INF file to the required parameters. In this case we change the INF file to use a 128MB ram drive. Don’t forget the mb behind the amounts

autoramresizer.inf example;

[Software.AddReg]
0×1,”MicrosoftWindowsCurrentVersionRunOnceEx100″,”100″,
“||xpeinit.exe -f -m AutoRamResizer AutoRamResizer.exe -l 64mb -h 128mb -f 32mb

Adding Building steps

Bart has removed the abilty to start custom commands with versions >= 3.1.0. of PE-Builder, therefore we need a other file to start the building proces.

Rename mkisofs.exe to mymkisofs.exe, then unpack the content of this archive into pebuilder directory.

Copy filecase.ini, InfCacheBuild.exe, mkisofs.exe, sort.txt and wrapper.cmd into the root of the PEBuilder directory. Edit wrapper.cmd to change your options.

Edit wrapper.cmd to change your options:

wrapper.cmd example

@echo off :settings
rem —————— SETTINGS —————–
rem set _volid=BartPE
set _volid=Windows_XPE {the title of the Image}
set _sortfile=sort.txt

set _mkisofsexe=mymkisofs.exe

set _duponce=-duplicates-once
rem set _duponce=

rem low | normal | high | realtime | abovenormal | belownormal
rem set _mkisofspriority=belownormal
set _mkisofspriority=normal

rem Actions
set _runinfcache=yes
set _copyhives=yes
set _setupisolinux=no
set _mkisofs=yes
rem —————— SETTINGS —————–
:copyright
echo _
echo *******************************
echo Build Script for BartPE v1.1
echo Copyright (c) 2005 Sherpya
echo *******************************

:getparams
for %%i in (%1) do set iso=%%~i
for %%i in (%2) do set pedir=%%~i

Etc…

  • _volid is the title of the Image.
  • _sortfile to pass to mkisofs for sorting order of files, I’ve tracked down a possible order (xpe optimized), but you can use your own.
  • _duponce if you want to add -duplicates-once to mkisofs (if supported)
  • _mkisofspriority can be low | normal | high | realtime | abovenormal | belownormal, the priority for mkisofs process.
  • _runinfcache if yes the script will call InfCacheBuild, it will removeCopyFiles, RenFiles and DelFiles sections from inf files, then it will build INFCACHE.1 to speedup pnp detection, also if filecase.ini is included it uppercases files from this file and it will add -U option to mkisofs so you will not get all files on Image in uppercase but only needed.
  • _copyhives if yes the script will copy registry hives for hdinstall, you should also edit pluginpeinstpeinst.cmd and add:

copy /y %_source%programspeinstdefault %_target%minintsystem32config >NUL:
copy /y %_source%programspeinstsoftware %_target%minintsystem32config >NUL:

  • before line saying “PEINST: Installation completed…”.
  • _setupisolinux if yes it will copy isolinux directory in the Image, also will setup needed mkisofs options, a sample config togheter with base files is included.
  • _mkisofs set this to no only for debug, it will prevent mkisofs call.

NOTES:

  • don’t press stop button while real mkisofs is running or you will need to kill it by hand (taskmanager) or wait its end.
  • if sortfile doesn’t exists -sort option will not be used
  • if filecase.ini is processed and no errors (except not found) occur, then -U option is added to mkisof

Closing Building steps

At the main PE Builder dialog, disable the “Burn to CD” option and click on “Build” button.

[SinglePic not found]

  1. Start the building process by clicking on the Builder button to start building BartPE. This will take a few minutes. You will see a lot of files getting copied and/or decompressed, the ISO image build.
  2. After the building process we can burn the ISO file to CD, boot from this CD!