Automate and simplify post-installation tasks on Windows using Winget and Chocolatey.
Setting up a freshly installed Windows 10 or 11 computer can be tedious and time-consuming, especially when you have to manually install each application you need. This tutorial will guide you through automating most of the package installation process, saving you time and ensuring you have a reusable setup for future reinstalls.
We will use Winget, a built-in Windows package manager, and Chocolatey, a popular package management tool, to streamline the process.
Before starting, ensure you have:
- Windows 10 (1809 or later) or Windows 11
- Administrator access
- Active internet connection
- Open a terminal as an administrator.
- Run the following command to install Chocolatey:
winget install Chocolatey.Chocolatey
After the installation completes, close the terminal.
- Create a configuration file (e.g., packages.config) to list all the packages you want to install. There is an example configuration file included in this repository. Use it as a reference.
- Visit the Chocolatey package repository to find the package names for your desired applications (e.g., googlechrome for Chrome)
- Add these package names to your configuration file.
- Open a terminal as an administrator.
- Run the following command to install all the packages:
choco install packages.config --yes
Replace packages.config
with the name of your configuration file.
Chocolatey will begin installing the listed packages. This process is fully automated and requires no input, allowing you to focus on other tasks while it runs.
Once the process completes, Chocolatey will display a summary of successes and failures. If a package fails to install, you can try installing it manually. For example, I encountered as issue with googledrive
and had to install it separately.
After the installations are complete, restart your computer to ensure everything is set up correctly. Enjoy your newly configured system!
The example packages.config
includes:
- Git: Version control
- VS Code: Code editor
- Notepad++: Text editor
- Google Chrome
- Brave: Privacy-focused browser
- PowerToys: Windows power-user tools
- Everything: Fast file search
- 7zip: File compression
- HWiNFO: System information
- LocalSend: File sharing
- Ollama: Local AI models
- PDFGear: PDF viewer and editor
-
Package Installation Failures
- Check your internet connection
- Try installing the package manually by running
choco install [package-name]
-
Permission Issues
- Ensure you are running as administrator
-
Chocolatey Installation Issues
- Try installing manually from chocolatey.org
- Check system requirements
To update all installed packages:
choco upgrade all --yes
To update specific packages:
choco upgrade [package-name]
To remove a package:
choco uninstall [package-name]