Choco Software
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.
Chocolatey simply provides a distribution mechanism for the software. Installing and updating software with Chocolatey becomes a single line of command line code: choco install markdownmonster and to update to the latest version: choco upgrade markdownmonster.
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:
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.
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.
Chocolatey Install Powershell
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
If it was an MSI, then usually you could pass -ia
:
Not the answer you're looking for? Browse other questions tagged chocolatey or ask your own question.
I'm installing this .msi using chocolatey which will install the Microsoft Visual C++ Compiler Package for Python 2.7, as I'm updating the vcpython27 nupkg.
When I run this command manually in a CMD.exe window, the installation shows up in 'Programs and Features', as expected:
However, when run through choco install <packagename>
, nothing shows up in 'Programs and Features'.
When looking at the silentArgs
in chocolateyinstall.ps1, the silentArgs
are set to:
When searching regedit for 'Microsoft Visual C++ Compiler Package for Python 2.7' after a regular msiexec installation from a CMD.exe prompt, I find the following keys:
If I uninstall and then install via choco instead, I only find the following keys:
I tried appending ALLUSERS=1
to the silentArgs
, but that doesn't do any difference.
This can all be tested right now, using the currently published version of vcpython27
, which exhibits the same issue:
I'm on Windows 10 Pro 64-bit.
How can I choco install
and make this application show under 'Programs and Features'?
1 Answer
Changing the following:
..into:
Cloud DVR storage space is limited. Watch maze runner 3 online hd free. Programming subject to regional availability, blackouts, and device restrictions. Pricing, channels, features, content, and compatible devices subject to change. Number of permitted concurrent streams will vary based on the terms of your subscription. Live TV may vary by subscription and location.
..made it show up in 'Programs and Features' and it can now be uninstalled from there as well as via choco uninstall vcpython27
.
I believe all of this was a result of me including $fileType
as an argument, while this variable had never been defined. So, you would assume the installation should fail, but it didn't. So a bug report was also filed.