This project is an EFI/UEFI utility for Windows to list, select, and change boot entries and related options.
La Booteja is a Windows-native CLI that manipulates UEFI boot configuration directly from userland. It focuses on the core boot variables that determine which EFI application or OS loader your firmware starts.
Typical tasks include:
- Viewing all
Boot####entries and the currentBootOrder - Changing the default boot target
- Scheduling a one-time boot via
BootNext - Enabling/disabling or renaming boot entries
- Adjusting boot timeout and related options
Booteja is not a replacement for Windows Boot Manager or bcdedit—it complements them by working at the UEFI variable level.
⚠️ Risk warning: Modifying UEFI variables can make a system unbootable. Use at your own risk. Test in a VM or non‑critical machine first and ensure you have recovery media ready.
- 📜 Enumerate
Boot####entries with labels, device paths, and status (active/hidden) - 🔁 View and reorder
BootOrder - 🎯 Set default boot target (
BootOrder[0]) or one-time target (BootNext) - 🏷️ Rename entries (description field)
- 🚫 Enable/disable entries (toggle
LOAD_OPTION_ACTIVEflag) - ➕ Create or remove entries (advanced; see warnings below)
- 🧰 Export/import boot entries to a JSON file for backup/restore
- 🔒 Secure Boot–aware (read-only fallbacks when privileges are insufficient)
Booteja uses Windows APIs to read/write UEFI variables under the global variable namespace:
BootOrder– the array of 16‑bit IDs (e.g.,0000,0001, …)BootNext– a one-time boot target (overridesBootOrderonce)Boot####– per-entry structures describing a boot option (attributes, description, device path, optional data)
On Windows, accessing these variables requires the SeSystemEnvironmentPrivilege and an elevated terminal. Some OEM firmwares may restrict modifications when Secure Boot or certain lockdown features are enabled.
- Windows 10/11 x64 on a UEFI system
- Administrator rights (elevated terminal) and firmware that supports UEFI variable access
- Build: Visual Studio 2022 (Desktop development with C++) or Build Tools for Visual Studio 2022 (MSBuild)
- Windows SDK: 10.0.22621 or newer
- Open
booteja.slnin Visual Studio 2022. - Select Release and x64.
- Build
▶️ Build Solution.
From a Developer Command Prompt for VS 2022:
msbuild booteja.sln /t:Build /p:Configuration=Release;Platform=x64Copy the built binary (e.g., booteja.exe) anywhere on your PATH (e.g., %ProgramFiles%\\Booteja).
You must run Booteja from an elevated terminal (Run as Administrator).
booteja <command> [options]
list— List allBoot####entries with IDs and attributesorder— Show currentBootOrderorder set <id[,id,...]>— Set a newBootOrdersequenceselect <id>— Make<id>the first item inBootOrder(default boot)next <id>— SetBootNextfor a one‑time bootenable <id>/disable <id>— Toggle entry active flagrename <id> "New Description"— Change the display labelcreate --file <efi-path> --desc "Label" [--data <hex> --active]— Create a newBoot####remove <id>— Delete a boot entrytimeout [get|set <seconds>]— Get or set the firmware boot timeout (if supported)export <file.json>/import <file.json>— Backup or restore entriesdump— Raw dump of variables for diagnostics
Run booteja help or booteja <command> --help for detailed flags.
List entries and current order:
booteja list
booteja orderSet a new default boot (make 0003 first in BootOrder):
booteja select 0003Schedule a one-time boot into 0004 (next reboot only):
booteja next 0004Reorder two entries explicitly:
booteja order set 0004,0001,0003,0002Rename and disable an entry:
booteja rename 0002 "Ubuntu NVMe"
booteja disable 0002Backup and restore:
booteja export boot-backup.json
# ...after changes or reinstall...
booteja import boot-backup.json💡 Tip: If your firmware hides inactive entries, use
list --allto include them.
-
Access is denied/ changes don’t persist- Ensure the terminal is Run as Administrator.
- Some devices require turning off fast startup or certain vendor security toggles before variable writes are allowed.
-
Entry IDs don’t appear after creation
- Power‑cycle the machine (full shutdown, not just reboot) so firmware rescans variables.
-
System won’t boot after changes
- Use your firmware setup utility to restore defaults or boot from recovery media and revert with
booteja import(if you exported a backup).
- Use your firmware setup utility to restore defaults or boot from recovery media and revert with
-
Secure Boot blocks edits
- Some OEMs restrict modifications. Consider using read‑only commands and vendor tools if writes fail.
Is this the same as bcdedit?
No. bcdedit manages the Windows Boot Configuration Data. Booteja operates on the firmware’s UEFI variables (Boot####, BootOrder, BootNext). They are related, but separate layers.
Does Booteja require EFI System Partition (ESP) drive letters?
No for listing and most edits. For create, you must provide a valid EFI application path on the ESP (e.g., \\\\?\\GLOBALROOT\\Device\\HarddiskVolume1\\EFI\\boot\\bootx64.efi).
Will this work with Secure Boot enabled? Reading usually works; writing may be restricted by firmware policy.
- Prefer RAII for buffer management and handles
- Wrap Windows API calls (
GetFirmwareEnvironmentVariableExW,SetFirmwareEnvironmentVariableExW) - Parse/load options in
EFI_LOAD_OPTIONformat - Unit-test device path parsing where possible
- Safer create/remove with firmware validation
- ESP path discovery helpers
- PowerShell completion script
- GUI wrapper for basic operations
- Signed releases
Issues and PRs are welcome. Please discuss significant changes first.
MIT (see LICENSE).