Using Boxstarter and Chocolately for Repeatable Windows 10 Installations
Tags: softwareengineering, windows, security
Published: 2020-04-21 19:24:42

---
title: Using Boxstarter and Chocolately for Repeatable Windows 10 Installations
published: true
date: 2020-02-08 21:06:00 UTC
tags: Software Engineering,Windows,Security
canonical_url: https://shriker.ca/using-boxstarter-chocolately-repeatable-windows-10-installations/
---

Local development environments have come a long way on Windows machines over the past decade.

We have the ease and use of [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) (WSL). You can get your favourite Linux distribution up and running fast with no need for VirtualBox or any other specific tools. For some folks, that may be all you need!

With [Windows Terminal](https://github.com/microsoft/terminal) slowly getting stronger (to the point where I don't feel as vulnerable while away from a \*nix system; finally tabs!), I can be more productive using Windows command line. My main issues with this in the past have been making a mess of my system environment variables, and forgetting where I've installed something. Chocolately and Boxstarter solve both of these issues for me.

Score.

## Installation Prerequisites

1. [Chocolately](https://chocolatey.org/) is a Windows package manager. It's similar to using MacPorts (which in turn is like BSD ports) or Homebrew (brew), if you are familiar with developing in macOS. Chocolately allows us to automate the entire Windows software lifecycle.
2. [Boxstarter](https://boxstarter.org/) allows you to write repeatable Windows installation scripts. This allows me to deploy scripts on beast machine work stations and temporary laptops with repeatable success.

### Windows 10 Work Development Environment

I work across a wide variety of technology and my development environments reflect that. You can find the specific scripts that I use in this [GitHub Gist](https://gist.github.com/shriker/239778729a66bc33376d01e284ac99f7). They must be run from a Boxstarter Shell.

This Gist contains the following for setting up a software development tools (Python, Go, Ruby, Node, PHP, C, etc), databases (MariaDB, PostgreSQL, MongoDB), apps and tools (Git, VS Code, Firefox, VirtualBox, 7-zip, PuTTY), light security environment (Wireshark, Burp Suite, nmap, HxD, etc), and more. All packages are from Chocolately.

<!--kg-card-begin: markdown-->
### Install From a Gist

```
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/shriker/239778729a66bc33376d01e284ac99f7/raw/ed43e0d2140a028cb7a56f60a5af7e071136d4e0/work-environment.ps1 -DisableReboots

```

Raw contents of the Gist:

```
Disable-UAC
Disable-GameBarTips
Disable-BingSearch

# windows updates
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula

# defaults
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrive -EnableShowFileExtensions -EnableShowFullPathInTitleBar

# environment
cinst vscode
cinst git --package-parameters="'/GitAndUnixToolsOnPath /WindowsTerminal'"
cinst firefox
cinst virtualbox
cinst 7zip
cinst putty
cinst sysinternals
cinst microsoft-windows-terminal

# frameworks
cinst dotnet4.6.2
cinst vcredist140

# languages
cinst python
cinst golang
cinst ruby
cinst tinycc
cinst nodejs-lts
cinst yarn
cinst php
cinst composer

# databases
cinst mariadb
cinst postgresql
cinst mongodb

# security
cinst yubikey-manager
cinst burp-suite-free-edition
cinst wireshark
cinst nmap
cinst hxd
cinst windbg

Enable-UAC

```
<!--kg-card-end: markdown-->

After I've set up my Windows box, the only remaining steps I need to do is generate a new ssh key and add it to Paegent (a PuTTY authentication agent), and then sync my [VS Code settings](https://dev.to/jodie/visual-studio-code-extensions-i-use-1e4o-temp-slug-1071029).

Oh, and if you want to set it all up in a VirtualMachine, or remotely? Boxstarter can do that too.