LoginSignup
55
39

More than 3 years have passed since last update.

生まれたてのwingetをベテランChocolateyと比較してみた

Last updated at Posted at 2020-05-26

はじめに

どうもこんにちは、Chocolatey愛好家のいけふちです。

ついに待望のWindows公式パッケージマネージャー「winget」が2020年5月19日にプレビューリリースしたと聞いて、「いったいどんな素晴らしい機能が!」と胸を躍らせていたのが昨日までのこと...。蓋を開けてみればとてつもなく発展途上だということが分かったので、(2020年5月26日時点の)wingetとChocolateyを比較し解説してみようと思いました。

いつかChocolateyを越えられる日が来ると願っております。

wingetの発展途上なところ

複数パッケージの同時インストールに対応していない

例えばChocolateyの場合、パッケージ名ごとにスペースで区切ることで、複数パッケージのインストールができます。

文法)choco install <pkg name1> <pkg name2> ・・・ <pkg nameN> [<option>]

PS C:\Windows\system32> choco install adobereader awscli docker-cli docker-desktop docker-kitematic git.install googlechrome kindle python teraterm terraform vagrant vim vscode winmerge winscp.install wireshark
Chocolatey v0.10.15
Installing the following packages:
adobereader;awscli;docker-cli;docker-desktop;docker-kitematic;git.install;googlechrome;kindle;python;teraterm;terraform;vagrant;vim;vscode;winmerge;winscp.install;wireshark
By installing you accept licenses for the packages.
~略~
Chocolatey installed 19/21 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

一方wingetは、2020年5月26日時点では複数パッケージの同時インストールには対応していません。

文法)winget install <pkg name> [<option>]

PS C:\Users\ikefuchi> winget install Googlechrome Amazon.Kindle
Windows Package Manager v0.1.41331 プレビュー
Copyright (c) Microsoft Corporation. All rights reserved.

必要なものが見つからないときに位置指定引数が見つかりました : 'Amazon.Kindle'

-eオプションがないとGitがインストールできない

wingetの仕様で、入力したパッケージ名を含む別のパッケージがあるとエラーが返されます。しかもその検索範囲は、オプションを何もつけない場合、名前・ID・Tagの3か所です。

PS C:\Users\ikefuchi> winget install git
Multiple apps found matching input criteria. Please refine the input.
Name                                    Id                                       Version      Matched
-----------------------------------------------------------------------------------------------------------------
Git                                     Git.Git                                  2.26.2       Moniker: git
Sublime Merge                           SublimeHQ.SublimeMerge                   1119         Tag: git
TortoiseGit                             TortoiseGit.TortoiseGit                  2.10.0.2     Tag: git
GitLFS                                  Git.GitLFS                               2.11.0       Tag: git
TortoiseSVN                             TortoiseSVN.TortoiseSVN                  1.13.1       Tag: git
Logitech Harmony Remote                 Logitech.Harmony                         1.0.1.308
GitHub Desktop                          GitHub.GitHubDesktop                     2.5.0
GitHub CLI                              GitHub.cli                               0.8.0
Atom                                    GitHub.Atom                              1.45.0
AdobeDigitalEditions                    Adobe.AdobeDigitalEditions               4.5.11
MicrosoftGitCredentialManagerforWindows Microsoft.GitCredentialManagerforWindows 1.20.0
Git Large File Storage                  GitHub.GitLFS                            2.11.0
Git Extensions                          GitExtensionsTeam.GitExtensions          3.3.1
MaxTo                                   DigitalCreations.MaxTo                   2.0.1
Gitter IM                               Gitlab.Gitter.IM                         4.1.0
GitKraken                               Axosoft.GitKraken                        7.0.0
NeoLoad                                 Neotys.NeoLoad                           7.3          Moniker: neoloadgit
AppInstallerFileBuilder                 Microsoft.AppInstallerFileBuilder        1.2020.211.0 Tag: GitHub

なので、Gitをインストールしたい場合には、明示的に-eオプションでパッケージ名の完全一致を使う必要があります。

PS C:\Users\ikefuchi> winget install -e Git
Found Git [Git.Git]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/git-for-windows/git/releases/download/v2.26.2.windows.1/Git-2.26.2-64-bit.exe
  ██████████████████████████████  44.7 MB / 44.7 MB
Successfully verified installer hash
Installing ...
Successfully installed!

ちなみに、Chocolateyの場合は特にオプションは必要ありません。

PS C:\Windows\system32> choco install git
Chocolatey v0.10.15
2 validations performed. 1 success(es), 1 warning(s), and 0 error(s).

Installing the following packages:
git
By installing you accept licenses for the packages.
Progress: Downloading git.install 2.26.2... 100%
Progress: Downloading git 2.26.2... 100%

git.install v2.26.2 [Approved]
git.install package files install completed. Performing other installation steps.
The package git.install wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): A

git v2.26.2 [Approved]
git package files install completed. Performing other installation steps.
 The install of git was successful.
  Software install location not explicitly set, could be in package or
  default install location if installer.

Chocolatey installed 2/2 packages.

パッケージ数が少ない

2020年5月26日時点では、wingetは352個、Chocolateyは2420個とその差は歴然です。

インストール済みパッケージを確認するコマンドがない

Chocolateyには、インストール済みのパッケージの一覧を表示するコマンドオプションがあります。一方wingetに2020年5月26日時点で、そのようなコマンドやオプションはないようです。

PS C:\Windows\system32> choco list --localonly                                                                         Chocolatey v0.10.15
2 validations performed. 1 success(es), 1 warning(s), and 0 error(s).

adobereader 2020.009.20065
awscli 2.0.15
~略~
wireshark 3.2.3
31 packages installed.

パッケージをアンインストールするコマンドがない

Chocolateyにはuninstallコマンドがありますが、2020年5月26日時点ではwingetにアンインストール機能はないようです。

パッケージのバージョンをアップグレードするコマンドがない

Chocolateyにはupgradeコマンドがありますが、2020年5月26日時点ではwingetにアップグレード機能はないようです。

GUIで操作できない

Chocolateyにはエンドユーザ向けのGUIが用意されていますが、wingetは2020年5月26日時点ではコマンドベースのみとなっています。
WS000007 (2).png

自分でリポジトリを作成できない

有償版Chocolateyの「Chocolatey for business」(以下C4B)には、あらかじめ自分のリポジトリサーバにパッケージをダウンロードして溜めておき、以降はリポジトリサーバへ疎通し、外部に抜けない環境内でパッケージをインストールできる機能があります。
リンク:https://chocolatey.org/docs/how-to-setup-offline-installation

2020年5月26日現在、wingetのリポジトリは1つしかありませんが、sourceコマンドがわざわざ用意されていることから将来的に内部リポジトリを作成・設定できるようになるかもしれません。

エージェントの中央管理ツールがない

C4Bには、エージェントのライセンスに紐づいた中央管理ツール「Chocolatey Central Management」(通称:CCM)があります。これにより、組織レベルでソフトウェアのインストール状況やバージョン管理を行えます。
将来的に無償のwingetで、DCなどを用いた中央管理機能が搭載されるととても嬉しいのですが、いかがでしょうかMicrosoft様!!
https://chocolatey.org/docs/features-chocolatey-central-management

おわりに

wingetの本リリースであるバージョン1は2021年5月頃となるそうで、現在OSS活動による改良が日々行われているようです。
https://github.com/microsoft/winget-cli

また最後の方でC4Bの機能を簡単に紹介しましたが、弊社WebサイトにC4Bに関する記事がありますので興味がありましたらぜひご覧ください。
https://c.itdo.jp/technical-information/system-manage/chocolatey-for-business/

55
39
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
55
39