claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Powershell Native Install does not copy claude.exe

Open peteralieber opened this issue 11 months ago • 6 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I ran the script, it created a bunch of files in .local/ and .claude/, but not claude.exe anywhere.

What Should Happen?

The script should install the latest version of claude.exe

Error Messages/Logs

PS C:\Users\peter> irm https://claude.ai/install.ps1 | iex
Setting up Claude Code...

✔ Claude Code successfully installed!

  Version: 2.0.67

  Location: C:\Users\peter\.local\bin\claude.exe


  Next: Run claude --help to get started

⚠ Setup notes:
  • installMethod is native, but claude command not found at C:\Users\peter\.local\bin\claude.exe
  • Native installation exists but C:\Users\peter\.local\bin is not in your PATH. Add it by opening: System
  Properties → Environment Variables → Edit User PATH → New → Add the path above. Then restart your terminal.


✅ Installation complete!

PS C:\Users\peter> Get-ChildItem -Recurse -Filter claude.exe $env:LOCALAPPDATA | Select-Object FullName
PS C:\Users\peter> Get-ChildItem -Recurse -Filter claude.exe $env:USERPROFILE
PS C:\Users\peter>

Steps to Reproduce

PS C:\Users\peter> irm https://claude.ai/install.ps1 | iex Setting up Claude Code...

✔ Claude Code successfully installed!

Version: 2.0.67

Location: C:\Users\peter.local\bin\claude.exe

Next: Run claude --help to get started

⚠ Setup notes: • installMethod is native, but claude command not found at C:\Users\peter.local\bin\claude.exe • Native installation exists but C:\Users\peter.local\bin is not in your PATH. Add it by opening: System Properties → Environment Variables → Edit User PATH → New → Add the path above. Then restart your terminal.

✅ Installation complete!

PS C:\Users\peter> Get-ChildItem -Recurse -Filter claude.exe $env:LOCALAPPDATA | Select-Object FullName PS C:\Users\peter> Get-ChildItem -Recurse -Filter claude.exe $env:USERPROFILE PS C:\Users\peter>

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.0.67

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

same as Issue 9445, but it is back at least as of 2.0.67

peteralieber avatar Jan 02 '26 05:01 peteralieber

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/14902
  2. https://github.com/anthropics/claude-code/issues/15847
  3. https://github.com/anthropics/claude-code/issues/14942

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Jan 02 '26 05:01 github-actions[bot]

@peteralieber same error here, fixed using the fix provided here:

https://github.com/anthropics/claude-code/issues/9238#issuecomment-3387782940

barruka avatar Jan 03 '26 08:01 barruka

To apply the fix, I had to run Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass to allow the local script to execute.

Can we please get an update regarding the core issue? This was quite a hassle to get Claude going locally.

coding-red-panda avatar Jan 05 '26 19:01 coding-red-panda

Still an issue today.

Tried the above mentioned Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass but still running into issue with the exe not being copied over to the right location.

cobyn avatar Jan 07 '26 02:01 cobyn

Just paid for Claude Code and it won't install too. Setting the execution policy does nothing; controlled folder access disabled.

argium avatar Jan 07 '26 05:01 argium

$newPath = "C:\Users\{your username}\.local\bin"
$Path = [Environment]::GetEnvironmentVariable("PATH", "User") + ";" + $newPath
[Environment]::SetEnvironmentVariable("Path", $Path, "User")

typing this into PS helps get it into the paths. For some reason the GUI way didn't work.

papahuge avatar Jan 13 '26 01:01 papahuge

Run PS as admin 🚀

perrelet avatar Jan 20 '26 17:01 perrelet

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar Feb 28 '26 10:02 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Mar 08 '26 14:03 github-actions[bot]