The command
lists the installed packages. But how do I determine where a Chocolatey application installs? So far I've had to hunt around for them.
Some examples:
- NUnit goes to
Program Files (x86)
- WGET goes to
%ALLUSERSPROFILE%chocolateybin and %ALLUSERSPROFILE%chocolateylib[Package Name]tools
- ConsoleZ went to
%ALLUSERSPROFILE%chocolateylib[Package Name]tools
Is there a flag on
choco list
that will tell me where they went? ChocolateyGUI doesn't seem to do this either.
Sort of like Debian's:
Or RedHat's:
Or YUM's repoquery:
Homebrew:
antwarpesantwarpes
4 Answers
Currently, there is no way to do what you are asking.
Each Chocolatey package is unique in the sense that it could be a wrapper around an MSI or an EXE, or it could be a simple extraction of a compressed archive to a known location i.e. C:tools, or it could be a PowerShell module that extracts to PSModulePath, or it could be something completely custom.
This is a side effect of the Windows ecosystem, where there are multiple ways to do the same thing. Chocolatey is trying to bring some sort of order to this by providing a mechanism to at least find all the packages that you want in one place, but there is only so much Chocolatey can do.
If you look at things completely differently, it is possible to pass installation arguments to a Chocolatey package using the following:
This could, in theory, alter the installation arguments of an MSI or EXE based Chocolatey package to change where the files are installed to. You can see an example of this approach being used here:
However, this approach is limited. Not everyone takes the time like Matt to mention the possible installation arguments that are possible, and it is quite a convoluted process to extract the installation arguments that are possible to be sent into an MSI or EXE.
In terms of ChocolateyGUI, and as the current maintainer of that product, I can tell you that it does nothing clever in this area :-). It is simply a wrapper around the command line tools that Chocolatey provides, and aims to make it easier for people who don't like using the command line.
Gary Ewan ParkGary Ewan Park
If Chocolatey generates a shim for the package, e.g.
yourprogram.exe
you can tell the path to executable file by the following Powershell one-liner:
This works only if shim is .exe file. This is very common, though some packages generate .ps1, .cmd or even .bat files. In these rare cases this recipe won't work.
maoizmmaoizm
Unfortunately, not that I know of. I believe the install directory is determined by the package itself. It's not defined in the .nuspec file, and I can't see anywhere that it's explicitly defined in the Chocolatey source code.
Source code: https://github.com/chocolatey/chocolatey
tbenz9tbenz9
If it was an MSI, then usually you could pass
-ia
:
themorethelessthemoretheless
Not the answer you're looking for? Browse other questions tagged chocolatey or ask your own question.
You can just call me choco.
- Information
- Committers
- Compiling / Building Source
- Other Platforms
- Compiling / Building Source
Build Status
TeamCity | AppVeyor | Travis |
---|
Chat Room
Come join in the conversation about Chocolatey in our Gitter Chat Room.
Or, you can find us in IRC at #chocolatey on freenode. IRC is not as often checked by committers, so it is recommended you stick to Gitter if you need more timely assistance.
Please make sure you've read over and agree with the etiquette regarding communication.
Support Chocolatey!
- Purchase Chocolatey Pro / Chocolatey for Business
See Chocolatey In Action
Chocolatey FOSS install showing tab completion and
refreshenv
(a way to update environment variables without restarting your shell):
Chocolatey Pro showing private CDN download cache and virus scan protection:
Etiquette Regarding Communication
If you are an open source user requesting support, please remember that most folks in the Chocolatey community are volunteers that have lives outside of open source and are not paid to ensure things work for you, so please be considerate of others' time when you are asking for things. Many of us have families that also need time as well and only have so much time to give on a daily basis. A little consideration and patience can go a long way. After all, you are using a pretty good tool without cost. It may not be perfect (yet), and we know that.
If you are using a commercial edition of Chocolatey, you have different terms! Please see support.
Information
- Mailing List / Release Announcements Only Mailing List / Build Status Mailing List
- Twitter / Facebook / Github
- Blog / Newsletter
- Documentation / Support
Documentation
Please see the docs
Give
choco.exe -?
a shot (or choco.exe -h
). For specific commands, add the command and then the help switch e.g. choco.exe install -h
.
Requirements
- .NET Framework 4.0+
- PowerShell 2.0+
- Windows Server 2003+ / Windows 7+
License / Credits
Apache 2.0 - see LICENSE and NOTICE files.
Submitting Issues
- If you are having issue with a package, please see Request Package Fixes or Updates / Become a maintainer of an existing package.
- If you are looking for packages to be added to the community feed (aka https://chocolatey.org/packages), please see Package Requests.
- Start with Troubleshooting and the FAQ to see if your question or issue already has an answer.
- If not found or resolved, please follow one of the following avenues:
- If you are a licensed customer, please see support. You can also log an issue to Licensed Issues and we will submit issues to all other places on your behalf. Another avenue is to use email support to have us submit tickets and other avenues on your behalf (allowing you to maintain privacy).
- If it is an enhancement request or issue with the website (the community package repository aka https://chocolatey.org), please submit the issue to the Chocolatey.org repo.
- If you have found an issue with the GUI (Chocolatey GUI) or you want to submit an enhancement, please see the ChocolateyGUI repository.
- If you have found an issue with the client (choco.exe), you are in the right place. Keep reading below.
Coco Software
Observe the following help for submitting an issue:
Prerequisites:
- The issue has to do with choco itself and is not a package or website issue.
- Please check to see if your issue already exists with a quick search of the issues. Start with one relevant term and then add if you get too many results.
- You are not submitting an 'Enhancement'. Enhancements should observe CONTRIBUTING guidelines.
- You are not submitting a question - questions are better served as emails or gitter chat questions.
- Please make sure you've read over and agree with the etiquette regarding communication.
Submitting a ticket:
- We'll need debug and verbose output, so please run and capture the log with
-dv
or--debug --verbose
. You can submit that with the issue or create a gist and link it. - Please note that the debug/verbose output for some commands may have sensitive data (passwords or apiKeys) related to Chocolatey, so please remove those if they are there prior to submitting the issue.
- choco.exe logs to a file in
$env:ChocolateyInstalllog
. You can grab the specific log output from there so you don't have to capture or redirect screen output. Please limit the amount included to just the command run (the log is appended to with every command). - Please save the log output in a gist (save the file as
log.sh
) and link to the gist from the issue. Feel free to create it as secret so it doesn't fill up against your public gists. Anyone with a direct link can still get to secret gists. If you accidentally include secret information in your gist, please delete it and create a new one (gist history can be seen by anyone) and update the link in the ticket (issue history is not retained except by email - deleting the gist ensures that no one can get to it). Using gists this way also keeps accidental secrets from being shared in the ticket in the first place as well. - We'll need the entire log output from the run, so please don't limit it down to areas you feel are relevant. You may miss some important details we'll need to know. This will help expedite issue triage.
- It's helpful to include the version of choco, the version of the OS, and the version of PowerShell (Posh) - the debug script should capture all of those pieces of information.
- Include screenshots and/or animated gifs whenever possible, they help show us exactly what the problem is.
Contributing
If you would like to contribute code or help squash a bug or two, that's awesome. Please familiarize yourself with CONTRIBUTING.
Committers
Committers, you should be very familiar with COMMITTERS.
Chocolatey Install Powershell
Compiling / Building Source
There is a
build.bat
/build.sh
file that creates a necessary generated file named SolutionVersion.cs
. It must be run at least once before Visual Studio will build.
Windows
Prerequisites:
- .NET Framework 3.5 (This is a windows feature installation).
- .NET Framework 4+
- Visual Studio is helpful for working on source.
- ReSharper is immensely helpful (and there is a
.sln.DotSettings
file to help with code conventions).
Build Process:
- Run
build.bat
.
George of the jungle 2 full movie. Running the build on Windows should produce an artifact that is tested and ready to be used.
Other Platforms
Prerequisites:
- Install and configure Mono 3.12.0 (3.8.0 should also work).
- Xamarin Studio is helpful for working on source.
- Consider adding the following to your
~/.profile
(or other relevant dot source file):
Choco Installed Software
- Set your permissions correctly:
Build Process:
- Run
./build.sh
.
Running the build on Mono produces an artifact similar to Windows but may have more rough edges. You may get a failure or two in the build script that can be safely ignored.
Credits
Chocolatey is brought to you by quite a few people and frameworks. See CREDITS (just LEGAL/Credits.md in the zip folder).
Chocolatey will perform a search for a package local or remote. Somemay prefer to use [[
clist
|Commandslist]] as a shortcut for [[choco list
|Commandslist]].
NOTE: 100% compatible with older Chocolatey client (0.9.8.x and below)with options and switches. In most cases you can still pass optionsand switches with one dash (
-
). For more details, seehow to pass arguments (choco -?
).
- Alternative Sources
Usage
Examples
NOTE: See scripting in how to pass arguments (
choco -?
) for how towrite proper scripts and integrations.
Exit Codes
Exit codes that normally result from running this command.
Normal:
- 0: operation was successful, no issues detected
- -1 or 1: an error has occurred
Enhanced:
- 0: operation was successful, no issues detected
- -1 or 1: an error has occurred
- 2: no results (enhanced)
NOTE: Starting in v0.10.12, if you have the feature 'useEnhancedExitCodes'turned on, then choco will provide enhanced exit codes that allowbetter integration and scripting.
If you find other exit codes that we have not yet documented, pleasefile a ticket so we can document it athttps://github.com/chocolatey/choco/issues/new/choose.
See It In Action
Alternative Sources
Available in 0.9.10+.
WebPI
This specifies the source is Web PI (Web Platform Installer) and thatwe are searching for a WebPI product, such as IISExpress. If you donot have the Web PI command line installed, it will install that firstand then perform the search requested.e.g.
choco list --source webpi
Windows Features
This specifies that the source is a Windows Feature and we shouldinstall via the Deployment Image Servicing and Management tool (DISM)on the local machine.e.g.
choco list --source windowsfeatures
Options and Switches
NOTE: Options and switches apply to all items passed, so if you arerunning a command like install that allows installing multiplepackages, and you use
--version=1.0.0
, it is going to look for andtry to install version 1.0.0 of every package passed. So please splitout multiple package calls when wanting to pass specific options.
Includes default options/switches (included below for completeness).
NOTE: This documentation has been automatically generated from
choco list -h
.