How to Install Chocolatey on Windows 10

What is Chocolatey

Chocolatey is a package manager for Windows just like apt-get for Ubuntu (Debian Linux Systems).

With chocolatey you will be able to script the install of Windows software or install it from the command line.

How to Install Chocolatey

To install chocolatey you need your command (or powershell) shell running as administrator. For winemacs users this is as simple as right-clicking on the run emacs desktop icon and selecting “Run as Administrator”.

Then simply copy and paste the below command.

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString(''))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Your install chocolatey command output log should look similar to the below.

Getting latest version of the Chocolatey package for download.
Getting Chocolatey from
Extracting C:\Users\apollo\AppData\Local\Temp\chocolatey\chocInstall\ to C:\Users\apollo\AppData\Local\Temp\chocolatey\chocInstall…
Installing chocolatey on this machine
Creating ChocolateyInstall as an environment variable (targeting ‘Machine’)
Setting ChocolateyInstall to ‘C:\ProgramData\chocolatey’
WARNING: It’s very likely you will need to close and reopen your shell
before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to ‘C:\ProgramData\chocolatey\lib’
(i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to ‘C:\ProgramData\chocolatey\bin’
and points to an executable in ‘C:\ProgramData\chocolatey\lib\yourPackageName’.

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when
upgrading from a version of Chocolatey less than 0.9.9.
‘Batch file could not be found’ is also safe to ignore.
‘The system cannot find the file specified’ – also safe.
chocolatey.nupkg file not installed in lib.
Attempting to locate it from bootstrapper.
PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding…
WARNING: Not setting tab completion: Profile file does not exist at
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
first prior to using choco.
Ensuring chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder

Leave a Reply

Your email address will not be published. Required fields are marked *