I would like to get chocolatey onto multiple systems. The normal way I do this is:
if (!(Test-Path "C:\ProgramData\chocolatey\bin")) {
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
}
That's fine, but this will connect to the internet, pointlessly re-downloading the Chocolatey package that I should be able to keep pre-downloaded, then extracting and setting up Chocolatey. This is like having to download a setup.exe
every single time that you just want to install a program (for 20 systems, you would then have to download setup.exe
20 times), which slows things down and feels wasteful when I just want to get the choco.exe
command available on systems as quickly as possible. I also don't mind if I have a slightly older version of chocolatey, I can redownload the main copy whenever I need.
It occurs to me that it should be easy to have the components pre-downloaded, so that I can just point at those files:
- What files do we need to pre-download to have everything required to setup Chocolatey?
- What command would we run against those files to set it up?
Note that this is quite a different question from How do you setup an offline Chocolatey instance?