BartPE Advanced Configuration

Show Sponsor:

Get secure access to email, files and network resources from home or while on the road. With GoToMyPC, you can access and use your PC from hotels, airports, Internet cafes anywhere with Web access. Start your FREE unlimited 30-day trial at: https://www.homenetworkhelp.info/gotomypc/

Show #70:

  • Date: 2007-03-19
  • Subject: BartPE Advanced Configuration
  • Duration: 43:48
  • Format: MP3
  • Size: 18,007 kb

Topics Discussed:

  • My Comments
  • Daylight Savings
  • Coupon Codes
  • Listen to previous Podcast on: BartPE Setup, Configuration, and Use
  • How to make a BartPE CD
  • How to add network cards to your BartPE
  • How to edit the BartPE Menu systems
  • How to create BartPE plugins
  • Links

Additional Information:

~~ Listen to previous Podcast on: BartPE Setup, Configuration, and Use

~~ How to make a BartPE CD

  1. Copy the Windows I386 to C drive (Or put in CD)
  2. Download BartPE software ( http://www.nu2.nu/pebuilder/ )
  3. Install. Puts into C:\pebuilder
  4. Start Application and configure basic options (Source, Custom Files, Output, Media Output)
  5. Click Plugins and select which plugins you want to use (read help files)
  6. Click Build (if any errors click < > arrows to fix)
  7. Use VMWare Player to test your build
  8. Make adjustments as needed
  9. Burn final ISO

~~ How to add network cards to your BartPE

BartPE will add any network drivers you need as long as it is configured correctly.

  1. Browse to: C:\pebuilder\drivers\Net
  2. Create a folder for your network card based on its name
  3. Go to the manufacturers website for your network card and download the Windows XP drivers
  4. Copy all the files from the network cards WinXP driver folder to the folder you created in the \Net directory
  5. Rebuild your BartPE CD to get the drivers included

~~ How to edit the BartPE Menu systems

BartPE uses XML files to handle its menu system. The primary plugin menu for a default install of BartPE is located at: C:\pebuilder\plugin\nu2menu. Nu2Menu has multiple files but the primary one to look at is: nu2menu.xml. There are other menu systems that can be used if you download them.

Inside the XML file are the lines needed to make the menu system for BartPE. Here is an example mini menu file:

<NU2MENU>
 <MENU ID="Startmenu">
  <MITEM TYPE="ITEM" DISABLED="1">BartPE version 3/19/2007</MITEM>
  <MITEM TYPE="SEPARATOR"></MITEM>
  <MITEM TYPE="ITEM" CMD="RUN" FUNC="@GetProgramDrive()\Programs\A43\A43.exe">File Manager</MITEM>
  <MITEM TYPE="POPUP" MENUID="Programs">Programs</MITEM>
  <MITEM TYPE="POPUP" MENUID="About">About</MITEM>
 </MENU>
 <MENU ID="Programs">
  <MITEM TYPE="POPUP" MENUID="Accessories">Accessories</MITEM>
 </MENU>
 <MENU ID="Accessories">
  <MITEM TYPE="ITEM" CMD="RUN" FUNC="@GetWinDir()\system32\wordpad.exe">Wordpad</MITEM>
 </MENU>
 <MENU ID="Spyware">
 </MENU>
 <MENU ID="About">
  <MITEM TYPE="ITEM" DISABLED="1">BartPE and PE Builder are Copyright (c) 2002-2004 Bart Lagerweij.</MITEM>
  <MITEM TYPE="ITEM" DISABLED="1">http://www.nu2.nu/pebuilder/</MITEM>
 </MENU>
</NU2MENU>

The menu system has specific commands that use basic XML type look and feel.

  • NU2MENU and /NU2MENU are the first and ending lines of the menu system
  • MENU ID - With space, is the name of a main menu group.
  • MITEM TYPE - Is an item in the menu group. You have "ITEM" which is usually a program and "POPUP" which is usually a submenu group in which you define a "MENUID" (without space).
  • DISABLED - You can disable a menu entry by selecting "1" if you wish to not let it be active but still be visible.
  • CMD - Is usually "RUN" and is in the menu line of a program you want to start.
  • FUNC - This is the command you wish to run in the menu item.

You can put all your menus together into one file or you can break them out. BartPE will take the menu XML files from each of the plugin folders and compile them into the menu system in sequence as it gets the files. Each plugin folder can have a file named usually after the plugin name followed by "_nu2menu.xml". An example might be "firefox_nu2menu.xml".

These files have the same basic format as the main file. In fact if you take the Menu ID from the primary menu you can adjust where you want your menu entries to be shown as BartPE builds the menu system during it being compiled.

~~ How to create BartPE plugins

Creating a BartPE plugin can be easy or hard. It really matters how complex of a program you are trying to create a plugin for. I suggest you start with simple programs so that you get a good understanding of how it work before you attempt a harder program like Adobe Photoshop or something.

Plugin folders contain many files with the most important of them being the pluginname.inf file and the pluginname_nu2menu.xml file for the menu system unless you want to put those entries into the main BartPE menu file. Additionally you will have other files that are needed to do the install. These could be .reg, .cmd, folders with program and DLLs, etc.

The pluginname.inf file contains all the information needed to get the program installed into BartPE as it is in the building process. This file must be an ascii file and not unicode. Lines that start with a ";" are ignored and used as comments. Here is an example plugin that I created for my SafeBoot install at work:

; SafeBoot BartPE
[Version]
Signature= "$Windows NT$"
[PEBuilder]
Name="SafeBoot"
Enable=1
Help="safeboot.txt"
[WinntDirectories]
a="System32\SafeBoot",1
[SourceDisksFiles]
files\SafeBoot.sys=4,,1
files\sbalg.sys=4,,1
files\rsvlock.sys=4,,1
files\sbtag=a,,1
files\TxtSetup.OEM=a,,1
[SetupReg.AddReg]
0x7,"ControlSet001\Control\Class\ {4D36E967-E325-11CE-BFC1-08002BE10318}","UpperFilters", "PartMGR","SafeBoot"
0x4,"ControlSet001\Services\RsvLock","Type",0x1
0x4,"ControlSet001\Services\RsvLock","Start", 0x1
0x4,"ControlSet001\Services\RsvLock","ErrorControl", 0x1
0x4,"ControlSet001\Services\SafeBoot","Type", 0x1
0x4,"ControlSet001\Services\SafeBoot","Start", 0x0
0x4,"ControlSet001\Services\SafeBoot","ErrorControl",0x3
0x4,"ControlSet001\Services\SBAlg","Type",0x1
0x4,"ControlSet001\Services\SBAlg","Start",0x0
0x4,"ControlSet001\Services\SBAlg","ErrorControl",0x3
0x1,"ControlSet001\Services\SBAlg","Group","Primary Disk"
[Append]
; "winpeoem.sif","sb_winpeoem.sif"
"txtsetup.sif","sb_txtsetup.sif"
[SetValue]
; Adjust txtsetup.sif
"txtsetup.sif", "SetupData", "loaderprompt", """Starting BartPE with SafeBoot Support..."""

Each section (identified by the [ ] characters) is used to help install the program into BartPE. As you can see this file has a lot of lines and that is why I recommend starting with a very simple program first. The basic steps to create a BartPE plugin are:

  1. Take a baseline of a computer including all files and registry settings.
  2. Install the program you wish to create a BartPE Plugin for.
  3. Use a program to show what new files and registry changes were made.
  4. Create your plugin folder and copy all the files from your program into the files folder of your plugin.
  5. Use your .inf file to list where each file from your program should go.
  6. Put all the registry changes into the .inf file.
  7. Build the BartPE image and test to see if your program works.
  8. If having problems (like needing to register DLL files, etc) make changes to your .inf file or create .cmd files to help with registring, etc.
  9. Rebuild the BartPE and test again till it works.

As you can see it can be quite complicated so I suggest looking at how other plugins were created and configured so they could be installed so that you can use these steps to help you create your own.

These lines are very important and must be in each plugin file. I have noted what you should change with your information.

[Version]
Signature= "$Windows NT$"
[PEBuilder]
Name="Put Name Of Your Plugin Here"
Enable=1
Help="Put Your Help File Here.txt"

The other sections have specific reasons and settings:

  • [WinntDirectories] - Is for what folders you want created.
  • [SourceDisksFiles] - Is for the files that are in your plugin folder and where they will need to be moved into the BartPE OS.
  • [SetupReg.AddReg] - What registry entries need to be added to the BartPE registry.
  • [Append] - If you need to add stuff to files in I386.

Here are two great sites that will help you create your first BartPE Plugin:
http://www.bootcd.us/Create_PEBuilder_Plugin.php
http://users.telenet.be/Robvdb/how_plugin.htm



....Back to Podcasts Archive....





GoToMyPC Promo Code - Try it Free
FREE GoToMyPC
Promo Code Trial + $10 Off!