Script to install dev tools on windows

Let’s say, you just installed windows operating system in a machine. Now you need to install all the tools you need to work as a .net developer. Its time consuming to download all the apps and install one by one. Chocolatey is there to help us. I found this way is faster to install necessary dev tools on windows OS

Firstly, open the powershell as administrator. And then you may need to change the access policy. Just copy the following code and wait for it to finish.

# Install Chocolatey
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'))

# *******************Setup machine**************
# Show File Extensions
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
Set-ItemProperty $key Hidden 1
Set-ItemProperty $key HideFileExt 0
Set-ItemProperty $key ShowSuperHidden 0
Stop-Process -processname explorer
# *************End of Setup machine**************

#Remote Desktop
Set-ItemProperty ‘HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\‘ -Name “fDenyTSConnections” -Value 0
Set-ItemProperty ‘HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\‘ -Name “UserAuthentication” -Value 1
Enable-NetFirewallRule -DisplayGroup “Remote Desktop”

# Chocolatey
choco install firefox -y

choco install googlechrome -y

# Install git related software
choco install git -y
choco install tortoisegit -y 
choco install git-credential-winstore -y

### add git location to env path	
if (($env:Path.Split(';') -contains "C:\Program Files\Git\bin") -eq $false) {
    $env:Path += ";C:\Program Files\Git\bin";
    [System.Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine );
}

# required dev tools
choco install fiddler -y
choco install postman -y
choco install putty.install -y
choco install adobereader -y
choco install notepadplusplus -y
choco install vlc -y
choco install filezilla -y

#Visual Studio Code
choco install visualstudiocode -y

#Node Js
choco install nodejs.install --global -y
#SQL Server
choco install sql-server-management-studio -y
#VisualStudio
choco install visualstudio2019community -y

#resharper
choco install resharper -y

# utilities to manage, diagnose, troubleshoot, and monitor Environment
choco install sysinternals -y
# Process Explorer
choco install procexp -y

Restart-Computer -Confirm

Voila!!!! Now you just installed following applications in your machine

  • Visual Studio Installer – Community Edition: You still need to install visual studio components according to your requirements
  • Visual Studio code
  • SQL Server Management Studio
  • Node JS installed globally
  • Git
    • Windows git
    • credential store
    • Tortoise Git
  • Few helpful tools, e.g.
    • FileZilla
    • Postman
    • Process Explorer
    • Fiddler, etc
  • Browsers
    • Firefox
    • Chrome

However, first command will download and install chocolatey in your machine. You can use chocolatey to upgrade or delete apps as well. To find out more about chocolatey check here

Secondly, it is changing some settings in your machine, that I always like to have. These are not chocolatey related, its mainly powershell script. And they are in the following list

  • Show hidden files
  • Show file extensions
  • Enable remote desktop, etc.

I hope you will find this helpful. Please find some more helpful links below

  1. https://nerdymishka.com/articles/chocolatey-a-beginners-guide-to-windows-package-management/
  2. Building my development machine from a script with Chocolatey and BoxStarter
  3. https://gist.github.com/jrolstad/74121b591ec8f8f86a09521f77e848e4

I would like to hear your thoughts