Whenever I'd not not use configuration management and offline installation tasks there, I go back to this notes.
Got me packet with all self hosted dependencies pwsh, .Net Framework 4.8.1 and 7zip.
It's based on official documentation: Completely offline install
-
Prerequisites are present on Windows machine:
- PowerShell 3.0+ PowerShell supported version list
- .NET Framework 4.8+ Chocolatey requirement list
- 7zip or you can enable windows built in option in install.ps1 file
set $env:chocolateyUseWindowsCompression = 'true'
-
Downloaded install.ps1 script from https://community.chocolatey.org/install.ps1
Locate into your preferred directory, for this example I usedC:\OfflineInstaller
-
Download Chocolatey package you intend to install, locate it to same directory as install.ps1 in previous step.
-
In install.ps1 file I edited value for
$ChocolateyDownloadUrl =
. Do check the script and adjust it to your liking❕
[CmdletBinding(DefaultParameterSetName = 'Default')]
param(
# The URL to download Chocolatey from. This defaults to the value of
# $env:chocolateyDownloadUrl, if it is set, and otherwise falls back to the
# official Chocolatey community repository to download the Chocolatey package.
# Can be used for offline installation by providing a path to a Chocolatey.nupkg.
[Parameter(Mandatory = $false)]
[string]
$ChocolateyDownloadUrl = 'file:C:\OfflineInstaller\chocolatey.2.3.0.nupkg',
- Open up PowerShell and run
install.ps1
This project includes content derived from the official Chocolatey documentation.
Portions of this documentation are modifications based on work created and shared by the Chocolatey community.
Official Chocolatey Documentation :: Official License Apache License 2.0