0

When I try to run chocolatey from the Command Prompt, it gives me this error:

The system cannot find the file C:\Chocolatey\bin\chocolatey.exe.

I've tried changing the environmental variable, but then it gives me (almost) the same thing:

The system cannot find the file C:\ProgramData\Chocolatey\bin\chocolatey.exe
user3806019
  • 45
  • 2
  • 9

2 Answers2

1

You'll need to provide more information here. This is not enough information to make a reasonable determination of your situation.

UPDATE: Try reinstalling. If that doesn't work, try a where.exe choco to try to determine where it is looking for the executable and if there is any conflicts. The last thing one could do is back up the lib/bin folders (minus choco.exe executables in the bin directory) and blowing the rest away and reinstalling. Plus maybe a restart.

ferventcoder
  • 11,952
  • 3
  • 57
  • 90
  • I'm running Windows 8.1 x64, and it has worked for me before, but only recently has it stopped working. When I go to the directory where it's stored and type dir, chocolatey.exe is there, and there are also the other files for chocolatey. What other information do you need? – user3806019 Mar 24 '15 at 14:03
  • So if you go to `c:\Chocolatey\bin` in your shell and type `.\choco.exe`, what do you get? – ferventcoder Mar 24 '15 at 15:56
  • The system cannot find the file C:\Chocolatey\bin\choco.exe. Also, choco.exe then gets deleted. – user3806019 Mar 25 '15 at 11:24
  • Let's chalk it up to a bad install - just install it again over the top of itself. – ferventcoder Mar 25 '15 at 16:37
  • I've done that many, many times, and it still doesn't work. In fact, I had to reinstall it to try running .\choco.exe – user3806019 Mar 25 '15 at 23:07
  • I'm really not sure what is different about your situation, but perhaps you can elaborate more up in the question about your environment. – ferventcoder Mar 26 '15 at 02:56
  • Try `where.exe choco` or in powershell `&where.exe choco` and see what the output is – ferventcoder Mar 26 '15 at 02:58
  • Clearly there is something going on. – ferventcoder Mar 26 '15 at 02:58
  • I reinstalled choco, and now it works fine, for some reason. When I ran where.exe choco, it gave me C:\Chocolatey\bin\choco.exe, though. – user3806019 Mar 26 '15 at 20:08
0

The chocolatey executable should be C:\ProgramData\chocolatey\choco.exe

Try the install steps again: https://chocolatey.org/install

Brent
  • 11
  • 4