chocolatey package code example

Example 1: install chocolatey

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Example 2: chocolatey installation

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command " [System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Example 3: what is chocolatey

// Chocolatey is a package management software for Windows operating system.

Example 4: where are chocolatey packages installed

Some packages are installed under ChocolateyInstall\lib, others 
- especially packages that are based on Windows installers (.msi files) 
- install to the default path of the original installer (which is most likely within Program Files).