Chocolatey こんなの待ってたWindows用パッケージマネージャ!

ありそうでなかったか?cygwinなどを利用しているユーザならばきっと気に入るのではないだろうか。
インストールは簡単で手元のSurface PRO2 (Windows 8.1)ではコマンドプロンプトでワンライナー入力するだけでOKです。

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\daisuke>@powershell -NoProfile -ExecutionPolicy unrestricted -Command "
(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.
ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Downloading https://chocolatey.org/api/v2/package/chocolatey/ to C:\Users\daisuke\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip
Download 7Zip commandline tool
Downloading https://chocolatey.org/7za.exe to C:\Users\daisuke\AppData\Local\Temp\chocolatey\chocInstall\7za.exe
Extracting C:\Users\daisuke\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\daisuke\AppData\Local\Temp\chocolatey\chocInstall...

7-Zip (A) 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Processing archive: C:\Users\daisuke\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip

Extracting  _rels\.rels
Extracting  chocolatey.nuspec
Extracting  tools\chocolateyInstall.ps1
Extracting  tools\chocolateysetup.psm1
Extracting  tools\init.ps1
Extracting  tools\chocolateyInstall\chocolatey.cmd
Extracting  tools\chocolateyInstall\chocolatey.config
Extracting  tools\chocolateyInstall\chocolatey.ps1
Extracting  tools\chocolateyInstall\LICENSE.txt
Extracting  tools\chocolateyInstall\NuGet.exe
Extracting  tools\chocolateyInstall\NuGet.exe.ignore
Extracting  tools\chocolateyInstall\functions\Append-Log.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Cygwin.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Help.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Install.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-InstallAll.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-InstallExtension.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-InstallIfMissing.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-List.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-NuGet.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Pack.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-PackagesConfig.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Push.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Python.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-RubyGem.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Sources.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Uninstall.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Update.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-Version.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-WebPI.ps1
Extracting  tools\chocolateyInstall\functions\Chocolatey-WindowsFeatures.ps1
Extracting  tools\chocolateyInstall\functions\Create-InstallLogIfNotExists.ps1
Extracting  tools\chocolateyInstall\functions\Delete-ExistingErrorLog.ps1
Extracting  tools\chocolateyInstall\functions\Generate-BinFile.ps1
Extracting  tools\chocolateyInstall\functions\Get-ChocolateyBins.ps1
Extracting  tools\chocolateyInstall\functions\Get-ConfigValue.ps1
Extracting  tools\chocolateyInstall\functions\Get-GlobalConfigValue.ps1
Extracting  tools\chocolateyInstall\functions\Get-LatestPackageVersion.ps1
Extracting  tools\chocolateyInstall\functions\Get-LongPackageVersion.ps1
Extracting  tools\chocolateyInstall\functions\Get-PackageFoldersForPackage.ps1
Extracting  tools\chocolateyInstall\functions\Get-PackageFolderVersions.ps1
Extracting  tools\chocolateyInstall\functions\Get-SourceArguments.ps1
Extracting  tools\chocolateyInstall\functions\Get-Sources.ps1
Extracting  tools\chocolateyInstall\functions\Get-UserConfigValue.ps1
Extracting  tools\chocolateyInstall\functions\Get-VersionsForComparison.ps1
Extracting  tools\chocolateyInstall\functions\Move-BadInstall.ps1
Extracting  tools\chocolateyInstall\functions\Remove-BinFile.ps1
Extracting  tools\chocolateyInstall\functions\Remove-LastInstallLog.ps1
Extracting  tools\chocolateyInstall\functions\Run-ChocolateyProcess.ps1
Extracting  tools\chocolateyInstall\functions\Run-ChocolateyPS1.ps1
Extracting  tools\chocolateyInstall\functions\Run-NuGet.ps1
Extracting  tools\chocolateyInstall\functions\Write-UserConfig.ps1
Extracting  tools\chocolateyInstall\helpers\chocolateyInstaller.psm1
Extracting  tools\chocolateyInstall\helpers\functions\Get-BinRoot.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-CheckSumValid.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-ChocolateyUnzip.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-ChocolateyWebFile.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-EnvironmentVariable.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-EnvironmentVariableNames.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-FtpFile.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-ProcessorBits.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-UACEnabled.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-VirusCheckValid.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-WebFile.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Get-WebHeaders.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyDesktopLink.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyEnvironmentVariable.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyExplorerMenuItem.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyFileAssociation.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyInstallPvackage.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyPackage.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyPath.ps1

Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyPinnedTaskBarItem.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyPowershellCommand.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyVsixPackage.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Install-ChocolateyZipPackage.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Set-EnvironmentVariable.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Start-ChocolateyProcessAsAdmin.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Test-ProcessAdminRights.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Uninstall-ChocolateyPackage.ps1
Extracting  tools\chocolateyInstall\helpers\functions\UnInstall-ChocolateyZipPackage.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Update-SessionEnvironment.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Write-ChocolateyFailure.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Write-ChocolateySuccess.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Write-Debug.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Write-Error.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Write-FileUpdateLog.ps1
Extracting  tools\chocolateyInstall\helpers\functions\Write-Host.ps1
Extracting  tools\chocolateyInstall\redirects\choco.exe
Extracting  tools\chocolateyInstall\redirects\choco.exe.ignore
Extracting  tools\chocolateyInstall\redirects\chocolatey.exe
Extracting  tools\chocolateyInstall\redirects\chocolatey.exe.ignore
Extracting  tools\chocolateyInstall\redirects\cinst.exe
Extracting  tools\chocolateyInstall\redirects\cinst.exe.ignore
Extracting  tools\chocolateyInstall\redirects\clist.exe
Extracting  tools\chocolateyInstall\redirects\clist.exe.ignore
Extracting  tools\chocolateyInstall\redirects\cpack.exe
Extracting  tools\chocolateyInstall\redirects\cpack.exe.ignore
Extracting  tools\chocolateyInstall\redirects\cpush.exe
Extracting  tools\chocolateyInstall\redirects\cpush.exe.ignore
Extracting  tools\chocolateyInstall\redirects\cuninst.exe
Extracting  tools\chocolateyInstall\redirects\cuninst.exe.ignore
Extracting  tools\chocolateyInstall\redirects\cup.exe
Extracting  tools\chocolateyInstall\redirects\cup.exe.ignore
Extracting  tools\chocolateyInstall\redirects\cver.exe
Extracting  tools\chocolateyInstall\redirects\cver.exe.ignore
Extracting  tools\chocolateyInstall\redirects\RefreshEnv.cmd
Extracting  tools\chocolateyInstall\tools\7za.exe
Extracting  tools\chocolateyInstall\tools\7za.exe.ignore
Extracting  tools\chocolateyInstall\tools\7za.exe.manifest
Extracting  tools\chocolateyInstall\tools\7zip.license.txt
Extracting  tools\chocolateyInstall\tools\checksum.exe
Extracting  tools\chocolateyInstall\tools\checksum.exe.ignore
Extracting  tools\chocolateyInstall\tools\checksum.license.txt
Extracting  tools\chocolateyInstall\tools\shimgen.exe
Extracting  tools\chocolateyInstall\tools\shimgen.exe.ignore
Extracting  tools\chocolateyInstall\tools\shimgen.license.txt
Extracting  package\services\metadata\core-properties\4f372a8ad0814653bb08ab44cc664894.psmdcp
Extracting  [Content_Types].xml

Everything is Ok

Files: 119
Size:       2661190
Compressed: 986422
Installing chocolatey on this machine
Creating ChocolateyInstall as an Environment variable (targeting 'User') and set
ting it to 'C:\ProgramData\chocolatey'
We are setting up the Chocolatey repository for NuGet packages that should be at
 the machine level. Think executables/application packages, not library packages
.
That is what Chocolatey NuGet goodness is for. The repository is set up at 'C:\P
rogramData\chocolatey'.
The packages themselves go to 'C:\ProgramData\chocolatey\lib' (i.e. C:\ProgramDa
ta\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin' and poi
nts to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

Creating Chocolatey NuGet folders if they do not already exist.

Copying the contents of 'C:\Users\daisuke\AppData\Local\Temp\chocolatey\chocInst
all\tools\chocolateyInstall' to 'C:\ProgramData\chocolatey'.
PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Add
ing...
Chocolatey is now ready.
You can call chocolatey from anywhere, command line or powershell by typing choc
o.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles first prior to
using chocolatey.
Ensuring chocolatey commands are on the path

C:\Users\daisuke>

インストールは以上で終わり。ここまで2,3分という手軽さである。
早速ヘルプをチェックしてみましょう。

C:\Users\daisuke>choco /?
Chocolatey detected you are not running from an elevated command shell
  (cmd/powershell). You may experience errors - many functions/packages
  require admin rights. Only advanced users should run choco w/out an
  elevated shell (and very advanced users as non-admin). When you open
  the command shell, you should ensure "Run as Administrator".
Version: '0.9.8.28'
Install Directory: 'C:\ProgramData\chocolatey'

== Chocolatey? ==
"I'm a tools enabler, a global silent installer. I met your mother.
 Some want to call me apt-get for Windows, I just want to get #chocolatey!"

Chocolatey is a package manager for Windows (like apt-get but for Windows).
 It was designed to be a decentralized framework for quickly installing
 applications and tools that you need. It is built on the NuGet
 infrastructure currently using PowerShell as its focus for delivering
 packages from the distros to your door, err computer.

Chocolatey is brought to you by the work and inspiration of the community,
 the work and thankless nights of the Chocolatey Team
 (https://github.com/orgs/chocolatey/members), and Rob (@ferventcoder)
 heading up the direction.

You can host your own sources and add them to chocolatey, you can extend
 chocolatey's capabilities, and folks, it's only going to get better.

== Chocolatey gods? ==
Humor related to playing off of tiki gods. We like humor. Don't take life
 so seriously, you will never get out alive.

== Release Notes ==
https://github.com/chocolatey/chocolatey/wiki/ReleaseNotes

== Package License Acceptance Terms ==
The act of running chocolatey to install a package constitutes acceptance
 of the license for the application, executable(s), or other artifacts
 that are brought to your machine as a result of a chocolatey install.
This acceptance occurs whether you know the license terms or not. It is
 suggested that you read and understand the license terms of any package
 you plan to install prior to installation through chocolatey.
If you do not accept the license of a package you are installing, please
 uninstall it and any artifacts that end up on your machine as a result
 of the install.

== Waiver of Responsibility ==
The use of chocolatey means that an individual using chocolatey assumes
 the responsibility for any changes (including any damages of any sort)
 that occur to the system as a result of using chocolatey.
This does not supercede the verbage or enforcement of the license for
 chocolatey (currently Apache 2.0), it is only noted here that you are
 waiving any rights to collect damages by your use of chocolatey.
It is recommended you read the license
 (http://www.apache.org/licenses/LICENSE-2.0) to gain a full understanding
 (especially section 8. Limitation of Liability) prior to using chocolatey.

== Commands ==
For all commands check out the command reference at:
 https://github.com/chocolatey/chocolatey/wiki/CommandsReference

 * Search - choco search something
 * List locally installed packages - choco list -lo
 * Install - choco install baretail
 * Update - choco update baretail
 * Uninstall - choco uninstall baretail
 * Install ruby gem - choco install compass -source ruby
 * Install python egg - choco install sphynx -source python
 * Install windows feature - choco install IIS -source windowsfeatures
 * Install webpi feature - choco install IIS7.5Express -source webpi

More advanced commands and switches listed on the command reference,
 including how you can force a package to install the x86 version of a
 package.

 Examples:
  * choco install nunit
  * choco install nunit -version 2.5.7.10213
  * choco install packages.config
  * choco update nunit -source http://somelocalfeed.com/nuget/
  * choco help
  * choco search nunit
  * choco list -localonly
  * choco version
  * choco version nunit
  * choco uninstall nunit
  * choco install sphynx -source python

== Create Packages? ==
We have some great guidance on how to do that. Where? I'll give you a
 hint, it rhymes with sticky!
 https://github.com/chocolatey/chocolatey/wiki/CreatePackages

In that mess there is a link to the Helper Reference -
 https://github.com/chocolatey/chocolatey/wiki/HelpersReference

Did you know we are rewriting Chocolatey? The new
version is much more stable and secure.

Find out more and support the future of Chocolatey
at https://bit.ly/chocolateykickstarter

Disable this message by changing ksMessage to false in chocolatey.config.

C:\Users\daisuke>
スポンサーリンク

シェアする

フォローする

スポンサーリンク