DEV Community

Cover image for Managing packages on Windows 10
Wagner Negrão 👨‍🔧
Wagner Negrão 👨‍🔧

Posted on • Updated on

Managing packages on Windows 10

For many years I used the Linux system and now I'm using Windows. I came across difficulties in installing many programs without having any automation in this process. Search about and I found the community chocolatey that say have the largest registry of Windows packages. They are similar to the apt in Linux and homebrew in MacOs, the Chocolaty it suits for manager packages for windows, it's amazing.

To install firstly, you have to open your terminal preferably the PowerShell and enable permission with the command.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Enter fullscreen mode Exit fullscreen mode

It's will enable that chocolaty can install and manage packages on your machine. Read this for knew more

In the second step, you will run this command:

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'))
Enter fullscreen mode Exit fullscreen mode

This command will install in your machine the Chocolaty and dependencies that are necessary, if all occurs well, you must execute this command in your terminal.

choco or choco -
Enter fullscreen mode Exit fullscreen mode

This command will show all options for using the Chocolaty.

Now, with Chocolaty installed can create files (.ps1) for automation of installation of programs with the example below.

"Installing program anki"
sleep(2)
choco install anki
sleep(2)
cls


"Installing program VLC"
sleep(2)
choco install vlc
sleep(2)
cls
Enter fullscreen mode Exit fullscreen mode

In this example, was installed Anki and VLC for my studies.

This program is very good for avoiding searching the packages .exe for install and facilitating the installation of many packages the once, and others management in the system.

Oldest comments (0)