Scripts for basic setup of a windows development machine (.NET Core and/or Node and/or java and/or Go and/or Rust development)
This script was developed based on what I needed to rebuild on my laptop moving from one client to another. Your mileage may vary and nothing stops you from changing the stuff inside it.
My preferred way of work is to NEVER login with an Administrator level account, and instead type the admin passwod every time a UAC popup shows on my screen, so I planned my setup around that. Some people hate that, if you're one of those people you can use this from an Administrator account as well, it will still work.
When I first wrote this script, the tools included were pretty much all portable and self-contained; with time, I've added more and more things (rust-msvc, python libraries) that rely on Microsoft C++ Build Tools.
So, before using this script, download the Microsoft C++ Build Tools, run the installer, and select the Desktop development with C++ workload.
Open powershell, then type, in this order:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-WebRequest -Uri "https://github.com/LoZeno/BasicSetup/archive/master.zip" -OutFile master.zip
Expand-Archive .\master.zip .\
cd .\BasicSetup-master\src\
.\setup.ps1
- Hyper-V and WSL (Windows Subsystem for Linux) in the Windows Features list. It does NOT install Ubuntu for WSL (or OpenSUSE for WSL or Kali or Debian...), for those you'll need to manually get them from the Microsoft Store
- Chocolatey package manager
- Scoop package manager or, alternatively, Shovel
- Docker Desktop
- Viscosity OpenVPN Client
- Powershell Core
- FiraCode font
- IDE and binaries for the chosen development stack(s) (.NET Core, Java, Go, Javascript, Rust)
- gsudo - a sudo for Windows (probably the best sudo-like tool for Windows that I have ever seen)
- Several CLI utilities: GOW, ag, bat, fd, noti, fzf and its Powershell wrapper PSFzf, a tldr-pages client
- Sysinternals tools
- Microsoft Powertoys
- Wonderful powershell and git utilities like TheFuck, PoshGit, oh-my-posh, git gud
- Initial setup for Git based on the user's prompt
- Convenient aliases in powershell core profile
- Commonly used VSCode extensions
- Extra utilities and software that I find useful and/or often required in various offices.
The list of applications and plugins that will be installed is stored in softwareList.csv
.
The CSV file shows the stack that each package/plugin belongs to, and the installer/application that will be used to download and install it (scoop, chocolatey or VisualStudio Code in case of its own plugins). During the execution of the script you'll be prompted to confirm installation of each list except for "base", which contain the "mandatory" stuff to install.
Before running the script you can easily edit the softwareList.csv
file to include your favourite packages or delete stuff you don't need, add new lists if you like and so on; I strongly advise against modifying the packages listed as "base" since some of those are necessary to make the rest of the scripts work.
Scoop is great but it does not have the same extensive library of software as chocolatey - especially when it's software that requires Admin privileges to be installed. So, to install things like Docker Desktop, Viscosity, and .NET framework (which is a prerequisite for Scoop anyway), I used chocolatey, and the script makes it run in an elevated prompt; to avoid adding more prompts for admin password, anything that needs Admin privileges to install is installed using chocolatey since there's already a step for it, and anything else using scoop.
I use the new Windows Terminal, with the FiraCode font instead of the default Cascadia Code; the powershell profile that gets updated by these scripts assumes FiraCode is used, so opening the normal Powershell window will result in missing characters in the oh-my-posh prompt.