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.
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.
Why Claude just doesn't run on Win7?
- Claude Code expects newer Windows features. VxKex NEXT fakes most of them.
- Three features are still missing after that. A small replacement file adds them.
- The old black Windows 7 shell window can't show colours or ansi terminal sequences properly. ConEmu can.
- Claude needs a command shell called Git Bash.
Shopping list
Collect everything before you start.
| What | Version used | Where to get it |
|---|---|---|
Claude Code (claude.exe) | 2.1.332 | Download 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.2202 | VxKex NEXT release 1.2.0.2202:https://github.com/YuZhouRen86/VxKex-NEXT/releases/tag/1.2.0.2202Under 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 only | Home-made. It isn't part of VxKex. Get it from here. |
| PortableGit, 64-bit | 2.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. |
| ConEmu | 23.07.24 | Download 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-x64 | Microsoft's download page: take Win7AndW2K8R2-KB3191566-x64.zip. Needs Windows 7 SP1 and .NET Framework 4.5.2 or newer. |
| A modern web browser | r3dfox (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.
certutil -hashfile "full path of the file" SHA256 and compare (spaces and capital letters don't matter):
- claude.exe 2.1.332:
E6652F9170A07DF45F1DB3E0520F1DF0F7B385181FF74F70F49398A67B5FD320 - VxKex setup:
7AB5C1CF3C702FC27168051DFF59A0829801C4BD8645E44E569A3D37FBD06A59 - KxBase-v2.dll:
2401E3705FE6EE3C68FB88A47918F860AF1C83E19DCA539759659CA7F0DA7D44 - PortableGit 2.46.2:
58AE5C1A27D3F9CE8518C1A187860973CFA4DD604F518350E84F7BAF418FC9FA - ConEmuPack.230724.7z:
2A9B98EBECAEDE62665EF427B05B3A5CCDAC7BD3202414FC0F4C10825B4F4EA2
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
- Double-click the
Win7AndW2K8R2-KB3191566-x64.msufile. (If you downloaded a ZIP, unpack it first.) - Say yes, wait, and restart when asked.
3.Unpack Git
- Double-click
PortableGit-2.46.2-64-bit.7z.exe. - When it asks where to put the files, type
C:\bin\git. - Check that
C:\bin\git\bin\bash.exenow exists.
4.Install VxKex NEXT and switch it on for Claude
- Run
KexSetup_Release_1_2_0_2202.exeas administrator. Keep the default folder,C:\Program Files\VxKex. - On the last installer screen, tick Open VxKex NEXT global settings (advanced) and click Finish.
- 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.)
- Restart if it asks.
- Open
C:\bin\claude, right-clickclaude.exeand choose Properties. - 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.
- Unzip the download: right-click
KxBase-v2.zip, choose Extract All, typeC:\bin\claudeas the folder, and click Extract. You now haveC:\bin\claude\KxBase-v2.dll. - Close Claude and any other program you run through VxKex.
- Open
C:\Program Files\VxKex\Kex64. - Rename
KxBase.dlltoKxBaseOrig.dll. Say yes to the administrator question. Don't delete it: the new file uses it. - Copy
C:\bin\claude\KxBase-v2.dllinto the same folder. - Rename your copy to
KxBase.dll.
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
- Make your modern browser the default browser.
- 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. - 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. - Type
helloand press Enter. If Claude answers, it works. - Ask it:
run the command: git --version. If you see a version number, commands work too.
9.Make it readable (recommended)
- Unzip
dejavymonoclaude_font.zipintoC:\bin\claude. You get the font and its license file; keep them together. - In
C:\bin\claude, right-clickDejaVuMonoClaude.ttfand 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.) - In ConEmu, right-click the title bar and choose Settings. Under the main font setting, choose DejaVu Mono Claude.
- Under Features, Colors, change the colour scheme. The default "Solarized" scheme can hide grey text. Colours matching the Windows 10 console work well.
- Click Save settings.
When something goes wrong
| You see | Try this |
|---|---|
| Claude doesn't start, or complains about a missing function | Check step 4 (the VxKex box) and step 5 (both KxBase.dll and KxBaseOrig.dll are there). |
Odd codes such as [39m all over the screen | You're in the old Windows window. Start with Claude-ConEmu.cmd. |
| Scrambled, overlapping text in ConEmu | You probably have the older "version 1" replacement file, or the original. Do step 5 with version 2. |
| Backspace deletes a whole word | Check the CLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0 line in Start-Claude.cmd. |
| Some text is invisible | Change ConEmu's colour scheme (step 9). |
| Empty boxes instead of symbols | Install and select the font (step 9). |
| Claude can't run commands | Check that C:\bin\git\bin\bash.exe exists. |
| ConEmu crashes, or shows a "ConEmuHk64 ... injecting hooks ... failed" box | Seen 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. |