What is BBox?
BBox is a dynamic shell application designed for
MiniNT & WinPEenvironments. 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 readsXMLfiles 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 thisXMLfile and so will not function if simultaneously installed with Nu2MenuShell Directory Structure
\BBoxcontains shell binaries, desktop-icons configuration file \Iconscontains icons required by the shell and user-provided icons used for menu-items & desktop-icons \Imagescontains images required by the shell including ' StartButton.bmp'\Menuscontains menu files required by the shell and user-provided menus in the nu2menu-format XML\Stylesreserved for future use
When the BBox process first starts, it loads customizable elements in the following order/manner:
- Icons required by BBox Shell are loaded from \BBox\Icons\. '
BBox.Shell.exe' requires and is distributed with the following icons: {Assembly, Cascade, Desktop, Gears, Paper, Power2, Run, ShadeAll, Shade, StartGroup, WindowManager}. The default configuration of the BBox plugin comes with menu files that also make use of these icons {FolderOpen, Info2, NetworkDrive, NetworkDriveNo, Properties, RecycleBinEmpty, TaskMgr} and so these icons are also distributed with the plugin.
- Images required by BBox Shell are loaded from
BBox\Images\. You will find 'StartButton.bmp' in this location.
- Additional user-provided/custom icons are loaded from
\BBox\Icons\and can be associated with menu-items & with desktop-icons by their index-name
Icon Indexing Rule An icon index-name is the icon's filename without the .ICOextension. Icon index-names are NOT case sensitive:
MyComputer.ico►MyComputer
- Menu files in Nu2Menu format are loaded from
BBox\Menus\. The file 'nu2menu.xml' needs to be located here ('bbox.inf' places it here by default). You can add additional menu files and assign them as context-menus to desktop-icons by their index-name (unlike icon indexing, menu indexing is case-sensitive and is described in the "Menu Indexing Rules" section below). The actual menus themselves are created in memory at this point and will remain static until the shell is restarted and the menu files are re-parsed.
- The file '
bbicons.bbconfig' is loaded from and used to configure the desktop-icons that will appear on the simulated desktop surface-window. You can customize the appearance and behavior of the icons that appear on the desktop as described in the "Desktop-icons Configuration File" section below.
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.ICOfile 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: 48Notes:
- 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 are loaded at shell-startup from
BBox\Menus\. AnyXMLfiles in this directory will be interpreted as a menu file which BBox will attempt to load.Menu File Rules
Menu File Node Types
A menu file consists of a series of the following
XMLnodes:
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:
TYPEVISIBILITY*substitute* DISABLED instead for legacy-compatiblityCMDFUNCICONPARMNot supported by BBoxThe TYPE attribute can have one of the following values:
ITEMdefines a menu-item that executes a function or command SEPARATORdefines a seperator-line to be drawn in the menu POPUPdefines a submenu The VISIBILITY attribute can have one of the following values:
0includes the menu-item in the menu 1includes the menu-item as a disabled item in the menu 2does 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:
RUNexecutes the directive specified in the FUNCattributeGETPROPERTIESshows shell-properties dialog for the file specified in the FUNC attributeLISTTASKSdisplays a task-switching submenu containing menu-items for each running task RELOADreloads the shell (this rebuilds the menus amongst other things) RECYCLEempty the recycle bin HIDEFROMTASKBARhide the menu process from the taskbar(Not supported by BBox)SHOWINTASKBARshow 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
@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 @ShowRunDialogShow the default windows 'Run' dialog. @Shr(integer, integer)Shift bitwise right @Ver()Displays version of the shell
@ChangeDir(string), @GetFileDialog(), @GetFolderDialog(), @GetHostName(), @GetOSversion(), @GetRegKey(string,string,string, string), @GetServicePackNumber(), @GetVar(), @Null(), @OsBuild(),@SetMenuPos(string, string), @SetVar()
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 - Box Shell Alpha3
Q: Can I use my own start button.
A: Yes, you can. Be sure it is called'StartButton.bmp'and put it in theBBox\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)