> ## Documentation Index
> Fetch the complete documentation index at: https://docs.barndoor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Barndoor Bridge on Windows

> Deploy the signed Bridge MSI, Barndoor's registry policy, and the Codex policy to Windows 11 devices with Microsoft Intune, and what Bridge supports on Windows.

This page is for the IT admin who deploys Bridge to Windows 11 devices. It uses **Microsoft Intune**; any MDM that can install an MSI as SYSTEM and run a PowerShell script as SYSTEM on a schedule can do the same. For Macs, see [Install on macOS](https://docs.barndoor.ai/how-tos/barndoor-bridge/install-with-mdm.md).

The install has five steps, all assigned to a pilot device group first:

1. [Render the policy scripts](#1-render-the-policy-scripts) from Barndoor's MDM kit.
2. [Install the app](#2-install-the-app-as-a-win32-app) as a Win32 app.
3. [Add the Remediations](#3-add-the-remediations) that apply Barndoor's settings and the Codex policy.
4. [Deploy the clients](#4-deploy-the-clients) people will use.
5. [Verify a device](#5-verify-a-device), then widen the group.

On Windows, Bridge runs from the system tray and launches Claude Desktop, Codex Desktop, and the Claude Code, Codex, and Kilo CLIs. Kilo Desktop, Kilo in VS Code, and provider lockdown aren't available on Windows.

> [accordion] What works on Windows
>
> | | Windows 11 |
> | - | - |
> | Bridge tray app, sign-in, sync | Yes. The tray menu opens the Bridge panel in your browser; there's no separate app window. |
> | Claude Desktop (Chat, Cowork, and the Code tab) | Yes, the **MSIX** build of Claude Desktop, 3.1623.0 or later. |
> | Claude Code CLI | Yes, with `barndoor run claude`. Also required for Claude Desktop when your Claude routes bill people's Claude subscriptions: Bridge uses Claude Code's sign-in. |
> | Codex CLI | Yes, with `barndoor run codex`. |
> | Codex Desktop | Yes, the **Microsoft Store** build (`OpenAI.Codex`). See [Codex policy on Windows](#codex-policy-on-windows). |
> | Kilo CLI | Yes, with `barndoor run kilo`. |
> | Kilo Desktop, Kilo in VS Code | No. |
> | Provider lockdown (DNS profile, Claude policy, Santa) | No. If a secure web gateway already blocks the provider APIs, record that with `--dns-control-source external_swg`. |

## Before you start

* **Windows 11 Pro, Enterprise, or Education** devices, Entra joined and enrolled in Intune, with an **Intune licence** for every user and device (Microsoft 365 Business Premium, E3 or E5, or Intune Plan 1; Business Standard doesn't include it).
* **Windows Enterprise E3 or E5** for Remediations (part of Microsoft 365 E3 or E5). Without it, see [Without Remediations](#without-remediations).
* **A Mac or Linux machine** to render the policy scripts. The MDM kit's `render.sh` is a bash script.
* **Two values from your Barndoor admin:** your organization slug and the backend URL. See [Values IT needs](https://docs.barndoor.ai/how-tos/barndoor-bridge/set-up-your-organization.md#values-it-needs).

## 1. Render the policy scripts

Unpack the [MDM kit](https://downloads.barndoor.ai/barndoor-gui/latest/barndoor-mdm-kit.tar.gz) and render the Windows files:

```bash theme={null}
./render.sh --platform windows \
  --org-hint <your-org-slug> \
  --backend-url https://app.barndoor.ai/api \
  --dns-control-source none \
  --out rendered
```

Use `--dns-control-source external_swg` instead if a secure web gateway already blocks the LLM provider APIs. The scripts land in `rendered/windows/`. They carry no IDs, so unlike the macOS profiles, re-rendering after a change is harmless.

> [accordion] What each rendered file does
>
> | File | What it does |
> | - | - |
> | `Detect-BarndoorPolicy.ps1`, `Set-BarndoorPolicy.ps1` | The **Barndoor policy**: registry values under `HKLM\SOFTWARE\Policies\Barndoor` that set your backend URL and organization slug and hand updates to your MDM. The Windows counterpart of the macOS managed settings profile. |
> | `Detect-CodexRequirements.ps1`, `Set-CodexRequirements.ps1` | The **Codex policy**: Codex's requirements file, `C:\ProgramData\OpenAI\Codex\requirements.toml`. It turns on **Launch Codex Desktop** and makes Codex work only through Barndoor. |
> | `barndoor-policy.reg` | The Barndoor policy as a `.reg` file, for a one-off device. |

## 2. Install the app as a Win32 app

Download the MSI for the current stable version, for x64 (`amd64`) or Arm (`arm64`): `https://downloads.barndoor.ai/barndoor-gui/<version>/Barndoor-<version>-windows-<amd64|arm64>.msi`, for example [`Barndoor-v0.1.246-windows-amd64.msi`](https://downloads.barndoor.ai/barndoor-gui/v0.1.246/Barndoor-v0.1.246-windows-amd64.msi). [`index.json`](https://downloads.barndoor.ai/barndoor-gui/index.json) gives the current stable version (`latest`) and each version's SHA-256.

Deploy it as a **Windows app (Win32)**, not as a line-of-business app, which doesn't install reliably:

1. On a Windows machine, wrap the MSI with Microsoft's [Win32 Content Prep Tool](https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool):

   ```powershell theme={null}
   IntuneWinAppUtil.exe -c <folder with the MSI> -s Barndoor-v0.1.246-windows-amd64.msi -o <out>
   ```

2. In Intune, **Apps → Windows → Add → Windows app (Win32)**, and upload the `.intunewin` file. Intune reads the install and uninstall commands and the detection rule from the MSI.

3. Assign it as **Required** to the device group.

Intune installs the app shortly after the device's next check-in. Add/Remove Programs then shows **Barndoor**, published by Barndoor AI, Inc.

> [accordion] What the MSI installs, and what Intune fills in
>
> The MSI is a per-machine installer, code-signed by Barndoor AI, Inc. It installs `C:\Program Files\Barndoor\barndoor.exe` (the `barndoor` command) and `barndoor-gui.exe` (the tray app), puts that folder on the machine `PATH`, and starts the tray at every sign-in.
>
> | Setting | Value |
> | - | - |
> | Install command | `msiexec /i "Barndoor-<version>-windows-amd64.msi" /qn /norestart` |
> | Uninstall command | `msiexec /x {<ProductCode>} /qn /norestart` |
> | Install behavior | System |
> | Detection rule | MSI, product code `{<ProductCode>}` |

## 3. Add the Remediations

Create a Remediation for each pair of rendered scripts (**Devices → Scripts and remediations → Remediations → Create**):

| Remediation | Detection script | Remediation script |
| - | - | - |
| Barndoor policy | `Detect-BarndoorPolicy.ps1` | `Set-BarndoorPolicy.ps1` |
| Codex policy ([see below](#codex-policy-on-windows)) | `Detect-CodexRequirements.ps1` | `Set-CodexRequirements.ps1` |

For both, run as SYSTEM (**Run this script using the logged-on credentials: No**), in 64-bit PowerShell, **hourly**, assigned to the device group. Leave **Enforce script signature check** off unless you sign the rendered scripts with your own certificate.

The Codex Remediation reports compliant until Bridge is installed, so expect the Codex policy up to an hour after the app.

> [accordion] Without Remediations
>
> Without Windows Enterprise E3 or E5, upload `Set-BarndoorPolicy.ps1` as a **platform script** (**Devices → Scripts and remediations → Platform scripts**) with the same settings. A platform script runs once, so upload it again after any change.

## 4. Deploy the clients

Bridge launches these clients but doesn't install them:

* **Claude Desktop:** the **MSIX** build, from `https://claude.ai/api/desktop/win32/x64/msix/latest/redirect`, as an MSIX line-of-business app or through your usual MSIX channel. Bridge refuses the build `winget install Anthropic.Claude` installs, with `install the MSIX build of Claude Desktop`.
* **Codex Desktop:** the **Microsoft Store** package (`OpenAI.Codex`). In Intune, add it as a **Microsoft Store app (new)**.
* **Claude Code**, only when your Claude routes bill people's Claude subscriptions: Claude Desktop gets the subscription sign-in from Claude Code. It installs per user (`irm https://claude.ai/install.ps1 | iex`). Bridge offers to install it at launch if it's missing, but deploying it with Bridge saves people the wait. The first time someone clicks **Launch Claude Desktop**, the tray signs them in to Claude.

> [!WARNING]
>
> **Keep `HKLM\SOFTWARE\Policies\Claude` clear** on devices that use Bridge. If your Claude Desktop registry policy sets anything beyond app-behaviour settings (`disableAutoUpdates`, `autoUpdaterEnforcementHours`, `updateViaUpdatesHost`, `relaunchEnforcementHours`, `configRecheckIntervalMinutes`, `egressProxyUrl`, `egressProxyPacUrl`), Claude Desktop ignores the configuration Bridge gives it and runs **ungoverned, with no error**. `barndoor doctor` warns when this is the case.

## 5. Verify a device

In the signed-in user's PowerShell (not over SSH, where Windows Credential Manager isn't available), run `barndoor doctor`. Among its sections, expect:

```text theme={null}
Managed preferences (MDM):
  Present:     yes
  Keys set:    backend_url, org_hint, …
  Updates managed: true
  Source:      HKLM\SOFTWARE\Policies\Barndoor
…
Claude Desktop policy (Windows registry):
  HKLM\SOFTWARE\Policies\Claude, HKCU\SOFTWARE\Policies\Claude: not set; Bridge's local Claude Desktop profile applies
…
Terminal command (`barndoor` on PATH):
  Bridge CLI:  C:\Program Files\Barndoor\barndoor.exe
  First on PATH: C:\Program Files\Barndoor\barndoor.exe
  Result:      ok (Bridge's CLI)
```

Then sign in from the tray icon (it may be under the **^** overflow), click **Launch Claude Desktop**, and ask for something that needs one of your organization's tools. Once the pilot looks right, widen the group. Bridge's log is in `%LOCALAPPDATA%\Barndoor\Logs`.

## Codex policy on Windows

The Codex policy works as it does on macOS. With it on a device:

* **Launch Codex Desktop** appears in the tray once Codex Desktop is installed for the user.
* The `codex` CLI, and Codex Desktop opened directly, work only through Barndoor. Codex Desktop opened directly stops at `ChatGPT configuration could not be loaded … undefined profile barndoor-active`; people launch it from Bridge instead.
* It replaces any Codex requirements file of your own, so a fleet that ships its own Codex requirements shouldn't deploy the Codex Remediation.

Bridge launches only Codex Desktop builds it has reviewed; `barndoor codex-desktop-policy builds` says whether the installed one is supported.

## Updates

There's no Windows updater script, and `barndoor update` refuses on managed devices. For each new stable release, add the new MSI as a new Win32 app that supersedes the previous one. Each MSI upgrades the one before it in place and never downgrades.

## Uninstall

Change the app's assignment to **Uninstall**; Bridge is removed at the next check-in. The Barndoor policy and the Codex policy stay, and without Bridge the Codex policy stops Codex Desktop from opening.

> [accordion] Remove the policies too
>
> Before you uninstall:
>
> 1. Unassign both Remediations.
> 2. As SYSTEM, run `barndoor.exe codex-desktop-policy remove`. It deletes only Barndoor's file.
> 3. As SYSTEM, run `reg delete HKLM\SOFTWARE\Policies\Barndoor /f`.
>
> Reassigning an uninstalled app as **Required** doesn't reinstall it right away: Intune waits up to 24 hours before it re-evaluates the app on that device.

## Local MCP servers on Windows

If your organization [publishes its own local MCP servers](https://docs.barndoor.ai/how-tos/barndoor-bridge/publish-local-mcp.md), pin the publisher key in the `publisher_keys` registry value instead of a macOS profile: fill in the commented `publisher_keys` line in both `Detect-BarndoorPolicy.ps1` and `Set-BarndoorPolicy.ps1`. `Set-BarndoorPolicy.ps1` deletes any value it doesn't list, so a key added another way is gone after the next hourly run. See [Pin the key with MDM](https://docs.barndoor.ai/how-tos/barndoor-bridge/publish-local-mcp.md#step-10-pin-the-key-with-mdm) and [Windows builds](https://docs.barndoor.ai/how-tos/barndoor-bridge/publish-local-mcp.md#windows-builds).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.