Creating Chocolatey Packages - TL;DR version

Here's a TL;DR quick start version of the package creating tutorial. Follow these steps to create a simple package.

Problem? Read the detailed version: Creating Chocolatey Packages


Quick start guide

Common Mistakes

Environmental Variables


Here are some simple examples.

chocolateyInstall.ps1 for .exe installer

$name = 'Package Name'
$installerType = 'exe'
$url  = 'http://path/to/download/installer.exe'
$silentArgs = '/VERYSILENT'

Install-ChocolateyPackage $name $installerType $silentArgs $url

NOTE: You have to figure out the command line switch to make the installer silent, e.g. /VERYSILENT. This changes from installer to installer.

chocolateyInstall.ps1 for .msi installer

NOTE: Please maintain compatibility with Posh v2. Not every OS we support is on Posh v2 (nor comes OOB with Posh v3+). It's best to work with the widest compatibility of systems out there.

$packageName = 'Package Name'
$installerType = 'msi'
$url = 'http://path/to/download/installer_x86.msi'
$url64 = 'http://path/to/download/installer_x64.msi'
$silentArgs = '/quiet'
$validExitCodes = @(0,3010)

Install-ChocolateyPackage $packageName $installerType $silentArgs $url $url64  -validExitCodes $validExitCodes

Parsing Package Parameters

For a complete example of how you can use the PackageParameters argument of the choco install command, see this How-To.