Skip to content

Instantly share code, notes, and snippets.

@sjg
Last active July 21, 2023 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjg/4fa8a79d50a6b58805141966bfc1a55e to your computer and use it in GitHub Desktop.
Save sjg/4fa8a79d50a6b58805141966bfc1a55e to your computer and use it in GitHub Desktop.
Touchtable Install Script
#!/usr/bin/env pwsh
# CASA Conntected Environments - Touchtable Windows Install Script
# Author: Steven Gray (@sjg)
# Date: 21-07-2023
# Updated: 21-07-2023
# Version: 1.0.1
# -----------------------------------------------------------------------------------
# WARNING - TOTAL INSTALL TIME IS APPROXIMATELY X HOUR AND WILL USE YGB OF HD SPACE
# -----------------------------------------------------------------------------------
# This script is intended to be run on a clean install of Windows 10.
# It will install a number of applications and may overwrite existing
# applications. It is recommended that you run this script on a fresh
# install of Windows 10.
# -----------------------------------------------------------------------------------
# -- Instructions --------------------------------------------------------------
# 1. Download this file to your desktop
# 2. Open PowerShell (Windows key + X, then select Windows PowerShell)
# 3. Type [ Start-Process powershell.exe -Verb RunAs ] (Remove the brackets)
# 4. Press Enter to run PowerShell as Administrator
# 5. In the new window Type [ cd ~/Desktop/; Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -Force; ./ce-apps-install.ps1 ] (Remove the brackets)
# 6. Press Enter to run the script.
# ------------------------------------------------------------------------------
# -- TEXT --------------------------------------------------------------
# Use https://patorjk.com/software/taag to create - ANSI SHADOW
$welcome = @"
██████╗ █████╗ ███████╗ █████╗ ██████╗███████╗ ████████╗ ██████╗ ██╗ ██╗ ██████╗██╗ ██╗████████╗ █████╗ ██████╗ ██╗ ███████╗
██╔════╝██╔══██╗██╔════╝██╔══██╗ ██╔════╝██╔════╝ ╚══██╔══╝██╔═══██╗██║ ██║██╔════╝██║ ██║╚══██╔══╝██╔══██╗██╔══██╗██║ ██╔════╝
██║ ███████║███████╗███████║ ██║ █████╗ ██║ ██║ ██║██║ ██║██║ ███████║ ██║ ███████║██████╔╝██║ █████╗
██║ ██╔══██║╚════██║██╔══██║ ██║ ██╔══╝ ██║ ██║ ██║██║ ██║██║ ██╔══██║ ██║ ██╔══██║██╔══██╗██║ ██╔══╝
╚██████╗██║ ██║███████║██║ ██║ ╚██████╗███████╗ ██║ ╚██████╔╝╚██████╔╝╚██████╗██║ ██║ ██║ ██║ ██║██████╔╝███████╗███████╗
╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝╚══════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═════╝ ╚══════╝╚══════╝
██╗███╗ ██╗███████╗████████╗ █████╗ ██╗ ██╗ ███████╗ ██████╗██████╗ ██╗██████╗ ████████╗
██║████╗ ██║██╔════╝╚══██╔══╝██╔══██╗██║ ██║ ██╔════╝██╔════╝██╔══██╗██║██╔══██╗╚══██╔══╝
██║██╔██╗ ██║███████╗ ██║ ███████║██║ ██║ ███████╗██║ ██████╔╝██║██████╔╝ ██║
██║██║╚██╗██║╚════██║ ██║ ██╔══██║██║ ██║ ╚════██║██║ ██╔══██╗██║██╔═══╝ ██║
██║██║ ╚████║███████║ ██║ ██║ ██║███████╗███████╗ ███████║╚██████╗██║ ██║██║██║ ██║
╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝
"@
Write-Host $welcome
# 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'))
scoop install git
scoop install sudo
# ---------------------------------------------------------------
# Install Scoop Repositories
# ---------------------------------------------------------------
Write-Host "Adding Scoops Buckets for installation"
scoop bucket add extras
scoop bucket add nonportable
scoop bucket add java
scoop bucket add main
# ---------------------------------------------------------------
# Install TouchTable Essential Applications
# ---------------------------------------------------------------
function touchtable_essential_apps {
Write-Host "Installing Touchtable Essential Applications"
scoop install vscode
scoop install googlechrome
scoop install firefox
scoop install vlc
# ---------------------------------------------------------------
# Install Apps with Chocolatey which are not in Scoop
# ---------------------------------------------------------------
Write-Host "Installing Course Essential Apps with Chocolatey"
choco feature enable -n allowGlobalConfirmation
choco install -y netfx-4.7.1-devpack
Write-Host "To update these apps in future use:"
Write-Host " choco upgrade all -y"
}
$answer = Read-Host "Do you wish to install CE TouchTable Essential Apps? (y/n)"
if ($answer.ToLower() -eq "y") {
touchtable_essential_apps
}
# ---------------------------------------------------------------
# Install Recommended CLI Tools
# ---------------------------------------------------------------
function recommended_cli {
Write-Host "Installing Recommended Command Line Tools."
scoop install git-aliases
scoop install ntop
scoop install git
scoop install git-lfs
scoop install nano
scoop install wget
scoop install curl
}
$answer = Read-Host "Do you wish to install CE Recommended Command Line Tools? (y/n)"
if ($answer.ToLower() -eq "y") {
recommended_cli
}
# ---------------------------------------------------------------
# .NET SDK Specific
# ---------------------------------------------------------------
function dotnet_tools {
Write-Host "Installing Windows .NET SDK tools."
scoop install dotnet-sdk
scoop install vcredist
# Removing the installers now that we've installed the apps
scoop uninstall vcredist2005 vcredist2008 vcredist2010 vcredist2012 vcredist2013 vcredist
}
$answer = Read-Host "Do you wish to install Windows .NET SDK Tools? (y/n)"
if ($answer.ToLower() -eq "y") {
dotnet_tools
}
# ------------------------------------------------------------------
# Install Node.JS and Set to latest Version // LTS previous as well
# ------------------------------------------------------------------
function nodejs_tools {
Write-Host "Installing Node.JS and NVM."
scoop install nvm
scoop install main/volta
mkdir ~/.nvm
nvm install 16.17.1
nvm install 16.19.1
nvm install 18.15.0
nvm use 16.17.1
}
$answer = Read-Host "Do you wish to install Node.JS and NVM? (y/n)"
if ($answer.ToLower() -eq "y") {
nodejs_tools
}
# ------------------------------------------------------------------
# Wrap up the install script
# ------------------------------------------------------------------
Write-Host "Install Script Finished."

Execute Install Script from Powershell

  1. Open PowerShell (Windows key + R, type powershell and press Enter).
  2. Copy and Paste the following commands
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser 
irm get.scoop.sh | iex
Start-Process powershell.exe -Verb RunAs
  1. Click Yes to Enter Administrator Mode
  2. Copy the following command in the new window to launch the install script:
$remoteFile = New-Object System.Net.WebClient
$remoteFile.Encoding = [System.Text.Encoding]::UTF8
Invoke-Expression($remoteFile.DownloadString('https://gist.githubusercontent.com/sjg/4fa8a79d50a6b58805141966bfc1a55e/raw/aa182558dd4286a4a78ed45cada2c68e3f512e75/ce-touchable-win-install.ps1'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment