You're trying to install the package chocolateygui using the choco command but you haven't installed chocolatey (the choco command) yet. Follow the install instructions to install chocolatey first then repeat what you did to install the chocolateygui interface.
> Thanks but installing chocolatey itself isn't an issue for me
You mentioned this:
> Also when I looked at the blog post above, the " > https://chocolatey.org/install.ps1&#8217 > " script it's referencing is not available anymore.
Which is why I spoke about how to install it.
My suggestion is to go through https://chocolatey.org/packages and look for similar packages to what you want to create and examine how those packages work.
Once you've done that then come back with any specific questions you have.
I'd suggest you take a look at ChocolateyGui as that is one of the scenarios when it works best - people unfamiliar with the command line (or who don't care about it) and just want to install software and keep it up to date.
You're looking for a configuration management tool such as Puppet, Chef, Ansible or DSC (Chocolatey has it's own DSC resource called cChoco). See Installing Chocolatey On Clients with Infrastructure Management Tools for more info.
My suggestion, depending on how many packages you need to do this on, would be to create the "work" (i.e. the scripts for checking for and extracting the information in this config file) into an extension package:
https://chocolatey.org/docs/how-to-create-extensions
Your package, and any other package, could then take a dependency on this extension package, and then use the methods that it provides.
Does that make sense?
The vcredist140 package is actually designed in such a way that it installs both x86 and x64 versions on the runtime, so I don't believe that this is an issue with Chocolatey incorrectly detecting that your machine is x86.
If you have a look through the installation script here:
https://chocolatey.org/packages/vcredist140#files
You will see what I mean.
Regarding the error code that you are receiving, I don't have any immediate suggestions though :-(
The value I was trying to create was having a collection of common programs that one would need when setting up a fresh windows installation. Kinda like ninite.com but with chocolatey :)
Same here, getting this for 2 days now on multiple computers:
Error retrieving packages from source 'https://chocolatey.org/api/v2/': Could not connect to the feed specified at 'https://community.chocolatey.org/api/v2/'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity.
Same here, getting this since yesterday on multiple boxes:
Error retrieving packages from source 'https://chocolatey.org/api/v2/': Could not connect to the feed specified at 'https://community.chocolatey.org/api/v2/'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity.
You could check out Chocolatey 4 Business, which allows you to install the choco-agent and install software from a web console. This is a paid solution, but very cheap for 10-20 computers.
I was confused, as I was unable to replicate this - however, re-reading your error message it becomes clear:
Get-ExecutionPolicy : Cannot bind parameter 'Scope'. Cannot convert value "AllSigned" to type "Microsoft.PowerShell.ExecutionPolicyScope".
You were running Get-ExecutionPolicy
, not Set-ExecutionPolicy
. Get-
's first parameter is for Scope
, not for ExecutionPolicy (AllSigned
is an execution policy, but isn't in the enum for Scopes for obvious reasons).
You should be able to run (as is documented here) Get-ExecutionPolicy
and Set-ExecutionPolicy AllSigned
- but Get-ExecutionPolicy AllSigned
will fail in the manner you show above.
This morning I'm getting 403 forbidden errors while trying to upgrade packages, is this related? >You have chocolatey v0.11.0 installed. Version 0.11.1 is available based on your source(s). chocolatey not upgraded. An error occurred during installation: The remote server returned an error: (403) Forbidden. Access denied for package 'chocolatey'. Ensure your license has not expired and is of the right type for this package. Trials: you are not allowed to use this source - please see the specific install instructions in your email and at https://chocolatey.org/docs/installation-licensed#how-do-i-install-the-trial-edition chocolatey package files upgrade failed with exit code 1. Performing other installation steps. The upgrade of chocolatey was NOT successful. chocolatey not upgraded. An error occurred during installation: The remote server returned an error: (403) Forbidden. Access denied for package 'chocolatey'. Ensure your license has not expired and is of the right type for this package. Trials: you are not allowed to use this source - please see the specific install instructions in your email and at https://chocolatey.org/docs/installation-licensed#how-do-i-install-the-trial-edition
not really what you asked for. (trigger from central location,) but maybe helpful: https://chocolatey.org/packages/choco-upgrade-all-at
Installs a choco package that creates a scheduled task to trigger updates.
Chocolatey installs packages silently so there is no way to show the GUI. As I suggested, check the package itself (the code and the description) on the package page to see if it offers that option.
The way to do this is to download and extract the Zip file (using Install-ChocolateyZipPackage
) and then install the EXE using Install-ChocolateyInstallPackage
.
See the freecommander-xe.install package code in GitHub.
Hope that helps. Let me know if you have any questions.
Chocolatey Server, AKA Simple Server, is not recommended for production use by only as a PoC or a demo environment and only then if there are no other options. It is very basic and is not a true repository manager.
> My major complaint is that we wanted a way to push the packages rather than just push with our configuration management team to pull from chocolatey server.
If you are using Chocolatey Server internally in a production environment, as it looks like you are above, you are going to hit a number of limitations and issue. It's not scalable, has limited options and isn't going to be useful in a production environment. You really should be looking to move to one of the options mentioned.
> I would wait for their central management console if that something your interested but sounds like you are using ansible so you should be good
Central Management is available now, is in Beta (as you mention later) and if you are a Chocolatey For Business customer then reach out and Chocolatey will be able to help you with that and / or Quick Deploy Environment (QDE).
> In my opinion it just seemed redundant since you still have to internalize chocolatey packages if you are not using community repo.
I'm not sure I understand this bit. Can you clarify what you feel is redundant?
> Also its worth mentioning that chocolatey requires an agent in your want any reporting of chocolatey packages in your environment. This is of course part of Central management console which is in Beta.
That is half true. Chocolatey requires an agent if you want centralised reporting. Chocolatey can provide data / reports through choco.exe
by logging into the machines that Chocolatey is installed on. I know this is a bit picky but I just wanted to be clear on that.
Chocolatey Central Management is also more than just a centralised reporting tool.
Yes you can schedule tasks like install and upgrade. You don't need the business version to do this either. You can host a Nexus Repo and deploy choco and point all the endpoints at the hosted repo. Then use a package like choco-upgrade-all-at which creates a Windows scheduled task to run on a given date/time. Works really well. https://chocolatey.org/packages/choco-upgrade-all-at
If you didn't explicitly install it, or Boxstarter, then you may have installed something that uses them as their installation method.
To explicitly install Chocolatey see https://chocolatey.org/install
As has been said this happens when the package you have is newer than what is available on your sources you see this. You have vscode.install
version 1.50.0
and the latest available on the Chocolatey Community Repository is version 1.49.3
. See <code>vscode.install</code>
I'm not really sure what you're asking so I'm going to have to guess a little.
The Firefox package is trusted - this means that it must pass all of the automated checks it automatically approved and bypasses human moderation.
I can't find any libreoffice7 package or libreoffice version 7 (there is a libreoffice version 6.46) so I can't comment on that. But in general a package goes through automated checks and then must have human moderation. Moderation is generally done by volunteers so the time they can spend on moderation varies.
You can raise a request for a volunteer maintainer to pick this up at Chocolatey Package Requests.
Alternatively you can look at the docs on how to create a package.
For something that comes from the Windows Store have a look at the Windows Terminal package.
With regards to running a cmd file my first question would be why can't you run it in PowerShell? Chocolatey uses PowerShell scripts in the package.
Two things:
You need to give us more info as we're scrambling about just now trying to understand what is going on - provide the exact steps you used and provide screenshots of the errors;
This package just creates a scheduled task, that runs the choco upgrade all -y
command at the date/time you provide. Check out the package docs for more info.
What the OP is looking for is Package Synchroniser Sync command that is available in the Business version of Chocolatey (ie. Chocolatey For Business or C4B).
Basically it does exactly what the OP is looking for.
https://chocolatey.org/docs/features-synchronize
Pro version does this automatically and Business version has the 'choco sync' command. If you want to keep using the free version you have to manually do 'choco install program' for each program in your system, for most apps it will not reinstall them, but it does take time to download the installer, after that it will detect that you already have it and register it in chocolatey.
> Anyways, are there reasons to leave the apps I want to use in default location?
I would always let software install to the default locations unless you have a strong reason not to? Can you elaborate on your question?
> Any benefits if I have them install in (example) Docs\My-Tools\ ?
If the installer of package allows you to install them there then you can. Not all packages / software allow that. I would point to the above answer though and ask why?
> Any security concerns?
I will point you to the Chocolatey Security page but if you can elaborate more on your question we can tackle the specifics of what your concerns are?
If you're looking for the most popular apps installed under Chocolatey then go to the Chocolatey Packages Homepage as they are listed in terms of popularity by default.
If however you are unable to install any applications my suggestion would be to resolve that issue first as it sounds like something is seriously wrong with your installation.
your source is the same as mine.. so technically it should work.
Are you able to install anything via choco?
If not it's possible that it's a proxy issue or something is being blocked. Your error does show up in the troubleshooting section.
You can setup WSL with Chocolatey Chocolatey won't install packages on WSL. Chocolatey is Linux only.
Having said that Chocolatey will run in Linux under Mono which some people do to create Chocolatey packages.
> Is it a bad idea to use Chocalatey if I am using WSL and linked my VS Code terminal to the Ubuntu one?
Chocolatey will run on your Windows machine and from there you can install VS Code (and other software) and work with it on Windows. You can also install VS Code in your WSL Linux flavour using whichever package manager is available on there.
> Where does chocolatey get packages from?
As has been said many times, Organisational Use of the Chocolatey Community repository is not recommended. All use of the repository is subject to rate limiting and IP blocking for excessive use.
Having said that, to answer your question, by default Chocolatey uses the 'Chocolatey' source which points to https://chocolatey.org/api/v2/
> How many sites would we have to whitelist other than chocolatey.org for chocolatey to work?
If you have the licensed version you would also have to whitelist the Licensed Packages source.
> Is there a primer for what we can and cannot get with Chocolatey enterprise?
Sign up for a demo and a trial. Chocolatey don't use hard sale tactics so if you get the demo / trial and the value is not there for you then feel free to keep using open source.
This is a problem for a lot of packages on the Community Repository and is not something that is within Chocolatey's ability to tackle. There are three options:
If you are submitting a package that installs / uninstalls software that you cannot embed into the package then every time the installer changes, the checksum changes and when people try to install it will fail (unless they use the --ignore-checksum
parameter). The solution for this is that you have to submit a new package version when this happens. The reason the installer will normally change is that there is a new version released, so it's easy to get a new package version number. If they don't release a new version but they change the installer (and this does happen) then you can submit a package fix version.
The licensed version of Chocolatey caches installers (not all of them - some can't be cached) so that if a user with a licensed version tries to install your package they will get the installer from the time you uploaded your package (ie. not the new one with the new checksum). So for them it will just work. As I said, that is assuming the installer has been cached.
If the software license allows you to embed the software inside the package then that will be used when installing the software so no downloading the new installer with the broken checksum. To allow this to happen the software must allow redistribution (because the Chocolatey Community Repository is a public resource).
I have a package, OneNote, where there is only ever one installer provided and when they update it, it breaks the current version. I can embed that software into the package so I have to upload a new version of the package every time it is updated.
Hope that helps!
packages.config file format has been around a long time and is used by Nuget. See the Chocolatey docs for more information on parameters.
That's what I thought - TLS 1.2 is needed to connect to Chocolatey.org. Are you using an unpatched Windows 7 by any chance?
Have a read at the blog post I pointed you to previously.
Can you read the blogpost on TLS 1.2, try out the commands in there to make sure it's enabled and run the Chocolatey install code from PowerShell?
Install-ChocolateyPackage
is to install using a 'normal' installer (ie. an EXE, MSI etc.).
If, what you are looking for, is to simply unzip the ZIP file into a folder then use <code>Install-ChocolateyZipPackage</code>.
See the Chocolatey helper functions for more.
> I now have the same version listed in both control panel and choco. I was using the latest version of dropbox on my computer, so I'm not sure what would happen in a case where your software was unmanaged by choco and outdated
IF you are using any licensed edition of Chocolatey then if you uninstall a packge outside of Chocolatey (ie. you go to Programs and Features and then uninstall from there) Chocolatey will use the Automatic Sync feature and also remove the Chocolatey package.
Not with the FOSS version,
Chocolatey 4 Business has a Package Synchronizer command which allows you to bring software, already in Programs and Features, to be managed by Chocolatey. All licensed versions of Chocolatey have the automatic synchornize feature which uninstalls any Chocolatey package that has been uninstalled from Programs and Features (ie. not using Chocolatey).
What you can do with most software is actually install the Chocolatey package for software in Programs and Features as a lot of Chocolatey packages silently install the native software installer. o if you already had Google Chrome installed (I haven't tried it with Google Chrome, I'm merely using it as an example to explain how it works) you could run choco install googlechrome -y
and it would install that for you. If you then uninstalled it using choco uninstall googlechrome -y
it would uninstall the software completely, including from Programs and Features.
Hopefully that helps?
What you're talking about is the [Package Synchoniser](https://chocolatey.org/docs/features-synchronize) feature of the commercial editions of Chocolatey.
The solution for the FOSS version is to install WhatsApp and then pin it (so its effectively pinned at that version and excluded from updates). You can do this with `choco pin add --name whatsapp`
What you are referring to is the Chocolatey Sync Command, which is documented here:
https://chocolatey.org/docs/features-synchronize#sync-command
This is currently available for Chocolatey for Business customers.
I don't know the program specifically but running cinst tautulli -y
will install it. You will need to likely configure it up.
You know where the package page is I put it here for for others.
With a Business license you can use sync which will bring software from Programs and Features into management by Chocolatey.
That aside, as /u/dmgctrl says it sounds like you've installed something manually and then expect Chocolatey to manage it - Chocolatey packages can only manage software that they have installed.
They're virtual.
I thought until now nuget
was a package manager (library manager) for .NET applications, like maven
is for Java. However, it seems nuget
has evolved more into a general package manager for Windows, is that right?
I see the latest version for apache-httpd on nuget.org is 2.4.4, last updated in 2013. https://www.nuget.org/packages/httpd/
Running choco.exe inside a package is bad practice and will only lead to problems.
You have two options if you want to install a package within a package:
We tend to recommend Artifactory, Nexus or ProGet to use as a package feed. If your requirements are simple you can use Chocolatey.Server (but it's also known as Simple.Server for a reason).
There was an extension made to do similar. Unfortunately it requires packagers to actually know about and use it to make it effective.
One more thing to point out that is very relevant to your original question is that Chocolatey licensed versions have "Runtime Malware Protection / Virus Scanning. You can read more about it here:
The reason why - iwr
is PowerShell v3+ (Windows 7 has PowerShell v2 by default). You may want to head back out to https://chocolatey.org/install and click on more options. Pick the one for PowerShell v2+, it will work for all of the machines in your organization. HTH
Full details here: https://chocolatey.org/faq#what-is-the-difference-between-packages-named-.install-i.e.-autohotkey.install-.portable-i.e.-autohotkey.portable-and-i.e.-autohotkey
> > Hey, good question! You are paying attention! Chocolatey has the concept of virtual packages (coming) and meta packages. Virtual packages are packages that represent other packages when used as a dependency. Metapackages are packages that only exist to provide a grouping of dependencies. > > A package with no suffix that is surrounded by packages with suffixes is to provide a virtual package. So in the case of git, git.install, and git.commandline (deprecated for .portable) – git is that virtual package (currently it is really just a metapackage until the virtual packages feature is complete). That means that other packages could depend on it and you could have either git.install or git.portable installed and you would meet the dependency of having git installed. That keeps Chocolatey from trying to install something that already meets the dependency requirement for a package. > > Talking specifically about the *.install package suffix – those are for the packages that have a native installer that they have bundled or they download and run.