# Way to list Chocolatey packages with their install directory

chocolatey

The command

choco list -lo


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%\chocolatey\bin and %ALLUSERSPROFILE%\chocolatey\lib\[Package Name]\tools
• ConsoleZ went to %ALLUSERSPROFILE%\chocolatey\lib\[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:

dpkg-query


Or RedHat's:

rpm -ql [package-name]


Or YUM's repoquery:

repoquery --list [package-name]

brew list [package-name]


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:

https://github.com/chocolatey/chocolatey/wiki/CommandsInstall#installarguments-optional---v09813

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:

http://chocolatey.org/packages/VisualStudio2013Ultimate

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.