LoginSignup
5
6

More than 5 years have passed since last update.

ワンライナーのコマンドでwebからDL & installできるのすごい

Last updated at Posted at 2015-10-08

chocolateyというwindows向けのパッケージ管理ソフトが下のコマンド一発で超Easy Installを実現しててすごく興味深い。

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

これ一行で

  • ウェブ上からパワーシェルでできたインストール用スクリプトをDL
  • インストール用スクリプトを実行

してるみたい。面白い。(セキュリティ的にはどうなんだろう?)
なんかに使えないかなーこれ1


ところで、コマンドプロンプトで以下のコマンドを実行することで、ファイルをダウンロードできます。wgetっぽいことがwindowsでできちゃいますね。

> powershell -NoProfile -ExecutionPolicy Bypass -Command "(new-object net.webclient).DownloadFile('URL', 'ファイル名')" 

なんかに使えないかなー(再


  1. 社内用のちょっとしたツールの配布とか? 

5
6
0

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
5
6