首页 > 代码库 > Chocolatey
Chocolatey
Chocolatey is kind of like apt-get, but for Windows (with Windows comes limitations). It is a machine level package manager that is built on top of nuget command line and the nuget infrastructure.
More behind the name
"Okay, machine package manager, that‘s nice. What does that mean though?"? It means you can simply install software with a few keystrokes and go get coffee while your co-workers are downloading and running an install manually (and I do mean something like an MSI).
How about updates? Wouldn‘t it be nice to update nearly everything on your machine with a few simple keystrokes? We think so, too. Chocolatey does that. choco upgrade all -y
升级后的提示:
C:\Users\Administrator>choco upgrade all -y
Chocolatey v0.10.0
Upgrading the following packages:
all
By upgrading you accept licenses for the packages.
You have chocolatey v0.10.0 installed. Version 0.10.3 is available based on your
source(s).
chocolatey v0.10.3 [Approved]
Creating ChocolateyInstall as an environment variable (targeting ‘Machine‘)
Setting ChocolateyInstall to ‘C:\ProgramData\chocolatey‘
WARNING: It‘s very likely you will need to close and reopen your shell
before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to ‘C:\ProgramData\chocolatey\lib‘
(i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to ‘C:\ProgramData\chocolatey\bin‘
and points to an executable in ‘C:\ProgramData\chocolatey\lib\yourPackageName‘
.
Creating Chocolatey folders if they do not already exist.
WARNING: You can safely ignore errors related to missing log files when
upgrading from a version of Chocolatey less than 0.9.9.
‘Batch file could not be found‘ is also safe to ignore.
‘The system cannot find the file specified‘ - also safe.
WARNING: Not setting tab completion: Profile file does not exist at ‘D:\用户目录
\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1‘.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
first prior to using choco.
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The upgrade of chocolatey was successful.
Software install location not explicitly set, could be in package or
default install location if installer.
NuGet.CommandLine v3.4.4-rtm-final is newer than the most recent.
You must be smarter than the average bear...
Chocolatey upgraded 1/2 packages. 0 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Check out Pro / Business for more features! https://chocolatey.org/compare
Chocolatey