Installing software is a tedious, repetitive and prone-to-errors process. Using the Chocolatey package manager, it is possible to automate software installation and upgrading.
This script was made for my own use and, although tested, may cause unwanted behavior for some people. Use at your own risk.
Clone the project if it is not cloned already:
git clone git@github.com:DuarteArribas/w11-config.git
Alternatively, download the zip and unzip it.
Go to the project directory:
cd softwareInstallation
Change the file packages.config
to include the packages you want to install. Packages that should not be installed should be commented, by prefixing the package with a #
. E.G.:
# == Browsers ==
googlechrome
#firefox
#brave
#microsoft-edge
#chromium
#vivaldi
opera
#tor-browser
# == Compression && Archiving ==
7zip
winrar
#peazip
In the previous example, google chrome, opera, 7zip and winrar would have been installed.
Office is installed by default (read on to figure out how to not install it by default). If you wish to install office, change the configuration-Office365-x64.xml
file or the configuration-Office365-x86.xml
file, depending if you have windows 32bit or 64bit and follow the intructions on the comment header, so that only the specific programs from the office suite that you wish are installed.
Run Set-ExecutionPolicy Bypass -Scope Process -Force
, so that the script can be executed.
To actually install the packages, run powershell and execute installPrograms.ps1
:
.\installPrograms.ps1 [-office] [-wsl] [-sb] [-hv] [-hp] [-vmp]
The -office
flag, when specified with false, will make it so that office is not installed.
The -wsl
flag, when specified with false, will make it so that wsl is not installed.
The -sb
flag, when specified with false, will make it so that windows sandbox is not installed.
The -hv
flag, when specified with false, will make it so that hyper-v is not installed.
The -hp
flag, when specified with false, will make it so that hypervisor platform is not installed.
The -vmp
flag, when specified with false, will make it so that virtual machine platform is not installed.
This script will reboot the PC a couple times (depending on the software you wish to install, but at least one time at the end). If the script finishes executing (i.e., the message saying that all the installations were complete is shown), then the script does not need to be ran anymore; if not, then the reboots may be needed reboots in the middle of the script, hence the script needs to be rerun.
Go to the project directory:
cd softwareInstallation
To update all packages, execute updatePrograms.ps1
:
.\updatePrograms.ps1
The following programs I usually also install, but need to be installed manually:
Battle.net