# mmseng/bcdedit-revert-uefi-gpt-boot-order architecture

> Architecture diagram of the GitHub repository mmseng/bcdedit-revert-uefi-gpt-boot-order, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mmseng/bcdedit-revert-uefi-gpt-boot-order
- Repository: https://github.com/mmseng/bcdedit-revert-uefi-gpt-boot-order

## Overview

This is a single-script Windows utility for promoting the first non-Windows entry in the UEFI boot order. The user runs the script, which uses bcdedit’s undocumented `{fwbootmgr}` identifier to find and move that entry. The README documents the behavior but no source excerpt is available, so the graph shows only documented relationships.

Main entry points: [`fix-uefi-boot-order.ps1`](https://github.com/mmseng/bcdedit-revert-uefi-gpt-boot-order/blob/master/fix-uefi-boot-order.ps1) (Boot-order script)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_script["Boot-order script"]
node_bcdedit["BCDEdit"]
node_uefi_order[("UEFI boot order")]

node_user -->|"runs"| node_script
node_script -->|"uses fwbootmgr"| node_bcdedit
node_bcdedit -->|"finds and reorders"| node_uefi_order

click node_script "https://github.com/mmseng/bcdedit-revert-uefi-gpt-boot-order/blob/master/fix-uefi-boot-order.ps1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user toneBlue
class node_script toneTeal
class node_bcdedit toneIndigo
class node_uefi_order toneAmber
```

## Components

### Other components

- **User**
- [Boot-order script](https://github.com/mmseng/bcdedit-revert-uefi-gpt-boot-order/blob/master/fix-uefi-boot-order.ps1): `fix-uefi-boot-order.ps1`
- **BCDEdit**
- **UEFI boot order**

## Connections

- User → Boot-order script: runs (evidence: `README.md`)
- Boot-order script → BCDEdit: uses fwbootmgr (evidence: `README.md`)
- BCDEdit → UEFI boot order: finds and reorders (evidence: `README.md`)
