Run Claude Code on Windows 7

Claude Code wasn't made to run on Windows 7. With a few helpers it does. Here is every step, in order, in plain words.

Read this first. This is an unofficial hack. Nobody supports it, and an update to Claude Code or VxKex can break it. It was done on 64-bit Windows 7 SP1 with Claude Code 2.1.332. It was tested with that version only, but it may work with other versions too. Keep a copy of a working claude.exe before trying another one. Windows 7 no longer gets security updates, so be careful what you keep on that PC.

To the author's knowledge, this hack doesn't violate or infringe any copyrights, licenses or trademarks. All copyrights, licenses and trademarks are the property of their rightful owners. This guide isn't made or endorsed by Anthropic or any other company named here.

Quick summary

Install the newer PowerShell, Git and VxKex. Turn VxKex on for claude.exe. Replace one VxKex file (KxBase.dll). Add ConEmu and create two start files. Then start Claude and sign in.


Claude Code 2.1.332 running in ConEmu on a Windows 7 Ultimate 64-bit desktop, with CPU-Z showing the Windows version

Close-up of a Claude Code session on Windows 7, answering whether Claude can run on Win7

Why Claude just doesn't run on Win7?

Shopping list

Collect everything before you start.

WhatVersion usedWhere to get it
Claude Code (claude.exe)2.1.332Download claude.exe 2.1.332 from Anthropic (about 403 MB), then check it against the checksum below.
Or copy it from a Windows 10 or 11 PC that has it. Typing where claude there shows where it is.
VxKex NEXT (KexSetup_Release_1_2_0_2202.exe)1.2.0.2202VxKex NEXT release 1.2.0.2202:
https://github.com/YuZhouRen86/VxKex-NEXT/releases/tag/1.2.0.2202
Under Assets, take the Release file, not Debug. Don't use a newer version: the replacement file below won't match it.
Replacement KxBase.dll ("version 2", file KxBase-v2.dll)For VxKex 1.2.0.2202 onlyHome-made. It isn't part of VxKex.
Get it from here.
PortableGit, 64-bit2.46.2 (last one for Windows 7)Git for Windows 2.46.2 release page: under Assets, take PortableGit-2.46.2-64-bit.7z.exe.
If GitHub downloads don't work, use the direct download from the npmmirror mirror, then check it against the checksum below.
ConEmu23.07.24Download ConEmuPack.230724.7z from the SourceForge mirror (it can be slow). Other places: the official release page or FossHub.
Windows Management Framework 5.1 (for newer PowerShell)Win7AndW2K8R2-KB3191566-x64Microsoft's download page: take Win7AndW2K8R2-KB3191566-x64.zip. Needs Windows 7 SP1 and .NET Framework 4.5.2 or newer.
A modern web browserr3dfox (a Firefox for Windows 7)Needed to sign in. r3dfox releases, or with an old browser the SourceForge downloads. Take the win64 installer.
Font "DejaVu Mono Claude" (optional, file DejaVuMonoClaude.ttf)Home-made from DejaVu Sans Mono 2.37 Get it from here.

You also need a Claude account that can use Claude Code, an internet connection, and an administrator account.

Check your downloads. In a Command Prompt, type certutil -hashfile "full path of the file" SHA256 and compare (spaces and capital letters don't matter): These are the checksums of the files that were actually used.

1.Make the folders

Everything lives in C:\bin. Create these:

C:\bin\claude
C:\bin\git
C:\bin\ConEmu

Copy claude.exe into C:\bin\claude.

2.Install the newer PowerShell

  1. Double-click the Win7AndW2K8R2-KB3191566-x64.msu file. (If you downloaded a ZIP, unpack it first.)
  2. Say yes, wait, and restart when asked.

3.Unpack Git

  1. Double-click PortableGit-2.46.2-64-bit.7z.exe.
  2. When it asks where to put the files, type C:\bin\git.
  3. Check that C:\bin\git\bin\bash.exe now exists.

4.Install VxKex NEXT and switch it on for Claude

  1. Run KexSetup_Release_1_2_0_2202.exe as administrator. Keep the default folder, C:\Program Files\VxKex.
  2. On the last installer screen, tick Open VxKex NEXT global settings (advanced) and click Finish.
  3. In the window that opens, under System integration, tick Add VxKex NEXT to:, choose extended context menu, and click OK. (The extended menu is the one you get with Shift + right-click. If you missed this screen, open VxKex NEXT Global Settings from the Start menu.)
  4. Restart if it asks.
  5. Open C:\bin\claude, right-click claude.exe and choose Properties.
  6. Open the VxKex tab, tick the box that enables VxKex for this program, and click OK.

5.Swap in the replacement file

This adds the three missing features (CreatePseudoConsole, ResizePseudoConsole, ClosePseudoConsole). Claude won't start without it. It also fixes the messy screen.

  1. Unzip the download: right-click KxBase-v2.zip, choose Extract All, type C:\bin\claude as the folder, and click Extract. You now have C:\bin\claude\KxBase-v2.dll.
  2. Close Claude and any other program you run through VxKex.
  3. Open C:\Program Files\VxKex\Kex64.
  4. Rename KxBase.dll to KxBaseOrig.dll. Say yes to the administrator question. Don't delete it: the new file uses it.
  5. Copy C:\bin\claude\KxBase-v2.dll into the same folder.
  6. Rename your copy to KxBase.dll.
To undo: delete the new KxBase.dll and rename KxBaseOrig.dll back to KxBase.dll. If you ever update VxKex, don't reuse this file with the new version.

6.Unpack ConEmu

Unpack the ConEmu package (you need a program such as 7-Zip) into C:\bin\ConEmu. Check that C:\bin\ConEmu\ConEmu64.exe exists.

7.Create the two start files

Open Notepad, paste the text, and choose File, Save As. Set "Save as type" to All Files, or Notepad will add .txt to the name.

First file: C:\bin\claude\Start-Claude.cmd

@echo off
rem One-time Git setup (the script deletes itself when done).
if exist "C:\bin\git\post-install.bat" (
    echo First start: finishing the Git setup, please wait...
    pushd "C:\bin\git"
    call post-install.bat
    popd
)

set "PATH=C:\bin\claude;C:\bin\git\cmd;%PATH%"
set "CLAUDE_CODE_GIT_BASH_PATH=C:\bin\git\bin\bash.exe"
set TERM=xterm

rem Make Backspace delete one character, not a whole word.
set CLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0

if not "%~1"=="" cd /d "%~1"
claude.exe
echo.
echo Claude Code ended with exit code %errorlevel%.

Second file: C:\bin\claude\Claude-ConEmu.cmd

@echo off
rem To work in another folder, change WORKDIR.
set "WORKDIR=%USERPROFILE%"
start "" "C:\bin\ConEmu\ConEmu64.exe" -NoSingle -Title "Claude Code" -Dir "%WORKDIR%" -run powershell.exe -NoExit -Command "& 'C:\bin\claude\Start-Claude.cmd' '%WORKDIR%'"

Tip: right-click the second file and choose Send to, Desktop (create shortcut).

8.Start it and sign in

  1. Make your modern browser the default browser.
  2. Double-click C:\bin\claude\Claude-ConEmu.cmd. If ConEmu asks setup questions the first time, accept them. The first start also finishes the Git setup, so be patient.
  3. Claude asks you to sign in. A browser page opens; log in and approve. If nothing opens, type /login, or copy the link Claude shows into your browser.
  4. Type hello and press Enter. If Claude answers, it works.
  5. Ask it: run the command: git --version. If you see a version number, commands work too.

9.Make it readable (recommended)

  1. Unzip dejavymonoclaude_font.zip into C:\bin\claude. You get the font and its license file; keep them together.
  2. In C:\bin\claude, right-click DejaVuMonoClaude.ttf and choose Install. (Windows copies it into its own Fonts folder.) It adds three symbols Claude uses that the normal DejaVu Sans Mono lacks. (This version of the font was previewed on Windows 10 but hasn't been tried on Windows 7 yet.)
  3. In ConEmu, right-click the title bar and choose Settings. Under the main font setting, choose DejaVu Mono Claude.
  4. Under Features, Colors, change the colour scheme. The default "Solarized" scheme can hide grey text. Colours matching the Windows 10 console work well.
  5. Click Save settings.

When something goes wrong

You seeTry this
Claude doesn't start, or complains about a missing functionCheck step 4 (the VxKex box) and step 5 (both KxBase.dll and KxBaseOrig.dll are there).
Odd codes such as [39m all over the screenYou're in the old Windows window. Start with Claude-ConEmu.cmd.
Scrambled, overlapping text in ConEmuYou probably have the older "version 1" replacement file, or the original. Do step 5 with version 2.
Backspace deletes a whole wordCheck the CLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0 line in Start-Claude.cmd.
Some text is invisibleChange ConEmu's colour scheme (step 9).
Empty boxes instead of symbolsInstall and select the font (step 9).
Claude can't run commandsCheck that C:\bin\git\bin\bash.exe exists.
ConEmu crashes, or shows a "ConEmuHk64 ... injecting hooks ... failed" boxSeen once, around the time of switching Claude's display mode with /tui default. The cause isn't known. Avoid changing the display mode if you don't need to.