Choco: 'choco install' command shows 'How do you want to open this file'

Created on 8 Aug 2018  路  7Comments  路  Source: chocolatey/choco

What You Are Seeing?

Windows shows this:
image

What is Expected?

Package is installed.

How Did You Get This To Happen? (Steps to Reproduce)

  1. Start admin powershell
  2. Run command: choco install package where the package name is any valid package name. Same results when adding --debug --verbose, so no log output is available.

Workaround:

Using the cinst package alias works as expected.

Version info

Chocolatey v0.10.11
PowerShell version : 5.1.17134.112
Windows 10 version 1803

Documentation

Most helpful comment

This is something we should add to https://chocolatey.org/docs/troubleshooting. Open powershell, copy the following exactly and paste it in:

  • where.exe choco

If you see it showing some file in "C:WindowsSystem32", then delete that file.

That's it. You should be good to go.

All 7 comments

Try re-installing Chocolatey. I bet your chocolateybinchoco.exe file is corrupt.

This is something we should add to https://chocolatey.org/docs/troubleshooting. Open powershell, copy the following exactly and paste it in:

  • where.exe choco

If you see it showing some file in "C:WindowsSystem32", then delete that file.

That's it. You should be good to go.

@ferventcoder I added this here

Deleting the C:\Windows\System32\choco as instructed fixes it for me!

However, the troubleshooting steps required using a cmdprompt instead of powershell:

Test results for where choco :

  • From Powershell non-admin: returns without output.
  • From Powershell admin: returns without output.
  • from cmd non-admin:

C:WindowsSystem32choco
C:ProgramDatachocolateybinchoco.exe

@jawn You've not done what was suggested by @ferventcoder.

where choco will give you no output as where in PowerShell is an alias for where-object. The command to use is:

where.EXE choco.exe

(my emphasis) Very important distinction. And does give you the output you expect.

We'll be sure to include that distinction in the notes, as most would believe that you can drop the .exe and get the same result. Even including the word "exactly" as I did above was not enough. This will be handled by the issue @pauby linked.

@ferventcoder Thanks for pointing out exactly why where didn't work. Old habits die hard.

Was this page helpful?
0 / 5 - 0 ratings