PE Builder v3 plugin

BBox Shell Alpha3

Dynamic shell / task- & window-manager for MiniNT / WinPE environments

Introduction

What is BBox?

BBox is a dynamic shell application designed for MiniNT & WinPE environments. It supports a large subset of the scripting language introduced by Nu2Menu to make the shell somewhat dynamic and to allow for a high degree of compatibility with existing Nu2Menu plugins.  Much like Nu2Menu, BBox reads XML files to build a 'Start Menu' which accessible via a 'Start Button' window.

Features beyond Nu2Menu

  • Taskbar for task management
  • System-tray icon support
  • System-tray clock
  • Simulated customizable 'Desktop' window with menu and desktop-icon support
  • Custom icons loaded at shell start-up can be assigned to menu-items and desktop-icons
  • Custom menus loaded at shell start-up can be assigned as context-menus on desktop-icons
  • Windows operating system look-and-feel

Authors Notes

  • This shell is perfect for people who want a light-weight alternative to running 'explorer.exe' under XPE but also want to support more shell-management functionality than 'nu2menu.exe' currently does...
  • Menu-item visibility/existence and enabled/disabled state is calculated at shell-startup and remains static until the shell is reloaded (this is an intentional simplification)
  • This plugin contains a 'nu2menu.xml' file to which your startmenu-nodes should be appended.  BBox expects to be the primary consumer of this XML file and so will not function if simultaneously installed with Nu2Menu

Shell Directory Structure

\BBox contains shell binaries, desktop-icons configuration file
    \Icons contains icons required by the shell and user-provided icons used for menu-items & desktop-icons
    \Images contains images required by the shell including 'StartButton.bmp'
    \Menus contains menu files required by the shell and user-provided menus in the nu2menu-format XML
    \Styles reserved for future use

Custom Menus, Icons, & Images

When the BBox process first starts, it loads customizable elements in the following order/manner:

Icon Indexing Rule
An icon index-name is the icon's filename without the .ICO extension.  Icon index-names are NOT case sensitive:

MyComputer.ico      ►     MyComputer

Desktop-Icons Configuration File

Desktop-icons are analogous to the functional icons such the 'Recycle Bin' which appear on the desktop window in Windows operating systems.

Desktop-icons in BBox respond to a double-click event by executing a command-line and to a right-click event by displaying a context-menu.  You can define desktop-icons in the file 'bbicons.bbconfig' located in \BBox\ .  To define an icon you specify the path to the .ICO file the icon should display, a command-line to execute when the icon is double-clicked, a menu index-name specifying the icon's right-click context-menu, a caption, and coordinates on the desktop in this file as follows:
 

bbicons.icon6.cmd: NOTEPAD.EXE
bbicons.icon6.caption: My Text Editor
bbicons.icon6.menu: Shell
bbicons.icon6.iconpath: Icons\editor.ico
bbicons.icon6.size: medium
bbicons.icon6.x: 21
bbicons.icon6.y: 19
bbicons.icon6.hwndWidth: 70
bbicons.icon6.hwndHeight: 48
Notes:
  • for the N-th icon specified use 'iconN' in place of 'icon6'
  • the 'caption' string will be truncated if it is longer than 13 characters
  • 'medium' is currently the only 'size' that is supported
  • only the values 70 & 48 are currently supported for 'hwndWidth' & 'hwndHeight'

Menu Files

Menu files are loaded at shell-startup from BBox\Menus\.  Any XML files in this directory will be interpreted as a menu file which BBox will attempt to load.

Menu File Rules

  • all menu nodes must be written in uppercase (nu2menu.exe rule does not apply to BBox)
  • function names for the scripting language are case sensitive (nu2menu.exe rule does not apply to BBox)
  • every opening tag needs a closing tag
Menu Indexing Rules
  • the value of 'MENU ID' is case sensitive and used as the index-name for the menu or submenu
  • the value of an MITEM node (its menu-item label) is case-sensitive and used as the index-name for non-submenu items
  • menu-item labels must be *unique* within the menu-hierarchy in which they are defined (duplicate label values in different menus are allowed) and they act as the index-name for menu-items
  • the first menu hierarchy defined in the main menu file 'nu2menu.xml' will be used as the start-button-menu and is required to have the case-sensitive menu-id 'Startmenu' as shown:


<NU2MENU>
    <MENU ID="Startmenu">
        ...
    </MENU>
    ...
    ...
</NU2MENU>

Menu File Node Types

A menu file consists of a series of the following XML nodes:

Menu Definition Node <NU2MENU>...</NU2MENU>
Menu Identification Node <MENU ID="menuId">...</MENU>
Menu-item Node <MITEM TYPE="...">...</MITEM>
  • Menu Definition Nodes inform the menu system that a new menu is being defined within

  • A Menu Identification Node uniquely identifies a menu so that it can be used as a submenu and so that menu-items can be assigned to it
  • A Menu-item Node can specify a function to execute or a submenu to display

MITEM Node Attributes

Menu-item nodes have several attributes:

TYPE  
VISIBILITY *substitute* DISABLED instead for legacy-compatiblity
CMD  
FUNC  
ICON  
PARM Not supported by BBox

The TYPE attribute can have one of the following values:

ITEM defines a menu-item that executes a function or command
SEPARATOR defines a seperator-line to be drawn in the menu
POPUP defines a submenu

The VISIBILITY attribute can have one of the following values:

0 includes the menu-item in the menu
1 includes the menu-item as a disabled item in the menu
2

does NOT include the menu-item in the menu (not supported when substituting DISABLED)

function This value can contain Nu2Menu Functions which will be evaluated and the result substituted into the final value.  The final value of this attribute must resolve to 0, 1, 2, TRUE, or FALSE

The CMD attribute can have one of the following values:

RUN executes the directive specified in the FUNC attribute
GETPROPERTIES shows shell-properties dialog for the file specified in the FUNC attribute
LISTTASKS displays a task-switching submenu containing menu-items for each running task
RELOAD reloads the shell (this rebuilds the menus amongst other things)
RECYCLE empty the recycle bin
HIDEFROMTASKBAR hide the menu process from the taskbar (Not supported by BBox)
SHOWINTASKBAR show the menu process from the taskbar (Not supported by BBox)

The value of the FUNC attribute only has meaning if the CMD attribute =RUN or =GETPROPERTIES

function This value can contain Nu2Menu Functions which will be evaluated and the result substituted into the final value.  The final value of this attribute must resolve to a valid command line or executable file. 


FUNC="@GetProgramDrive()\Programs\BBox\setres.exe)"
 

The ICON attribute should specify the index-name of an icon to associate with the menu-item:

e.g. if you want to use the following icon:
   
    BBox\Icons\Cli.ico

you would associate it with a menu-item as follows:

    <MITEM TYPE="ITEM" VISIBLITY="1" CMD="RUN" FUNC="cmd.exe" ICON="Cli">CMD Prompt</MITEM>
 

Example Menu (Nu2Menu format with BBox extensions):

<!-- Menu Entry -->
<NU2MENU>
    <MENU ID="Startmenu">
        <MITEM TYPE="ITEM" VISIBLITY="..." CMD="..." FUNC="..." ICON="...">Menu Label</MITEM>
        <MITEM TYPE="SEPARATOR"></MITEM>
        <MITEM TYPE="POPUP" MENUID="SubMenuId" ICON="...">Sub-menu Label</MITEM>
        ...
    </MENU>
    <MENU ID="SubMenuId">
        ...
    </MENU>
    ...
</NU2MENU>

Nu2Menu Functions

For more detailed information about Nu2Menu functions refer to:  Nu2Menu Functions Reference

Supported by BBox

@And(boolean, boolean) Logical AND function
@Exec(string, integer) Executes file
@Exit() Shuts down the shell
@FileExists(string) Checks if file exists
@GetEnvVar('string') Get environment variable
@GetProgramDir() Returns the the program directory like "C:\programs"
@GetProgramDrive() Returns the program drive, like "C:\"
@GetTmpDir() Returns the path of the directory designated for temporary files
@GetUserName() Returns username
@GetWinDir() Returns the windows directory, like "C:\windows"
@Not(boolean) Logical NOT function
@Or(boolean, boolean) Logical OR function
@Reload() Reload menu as a function
@SetEnvVar() Set environment variable
@Shl(integer, integer) Shift bitwise left
@ShowRunDialog Show the default windows 'Run' dialog.
@Shr(integer, integer) Shift bitwise right
@Ver() Displays version of the shell

 

Not Yet Supported By BBox

@ChangeDir(string), @GetFileDialog(), @GetFolderDialog(), @GetHostName(), @GetOSversion(), @GetRegKey(string,string,string, string), @GetServicePackNumber(), @GetVar(), @Null(), @OsBuild(),@SetMenuPos(string, string), @SetVar()

Hotkeys

The following hotkeys are registered by BBox Shell:

CTRL + ALT + T executes 'taskmgr.exe'
CTRL + ALT + C executes 'cmd.exe'
The following hotkeys execute Environment Variables which can be set to applications of your choice.  You can define these by adding a registry setting.  An example of how to do this is in 'bbox.inf'
CTRL + ALT + M executes the environment variable '%DefaultFileManager%'
CTRL + ALT + N executes the environment variable '%DefaultTextEditor%'
CTRL + ALT + F

executes the environment variable '%DefaultSearchUtility%'

Download

Download - Box Shell Alpha3

Frequently asked questions

Q: Can I use my own start button.
A: Yes, you can. Be sure it is called 'StartButton.bmp' and put it in the BBox\Images\ directory

Q: Can I check if a directory exist.
A: Yes, you can. Unlike Nu2Menu, 'nul' is NOT required to do so. 

The following example checks if the 'system32' directory exists.

@FileExists(@GetWinDir()\system32)


BBox Shell Copyright (c) 2004-2005 Brian Bennewitz. All rights reserved.
PE Builder Copyright (c) 2002-2004 Bart Lagerweij. All rights reserved.

Nu2Menu Copyright (c) 2003-2004 Henk de Jong. All rights reserved.