Skip to content

Instantly share code, notes, and snippets.

@spike1292
Last active March 15, 2023 13:48
Show Gist options
  • Save spike1292/c064c43aaf3df656b346680b3915e2c1 to your computer and use it in GitHub Desktop.
Save spike1292/c064c43aaf3df656b346680b3915e2c1 to your computer and use it in GitHub Desktop.
Boxtstarter install
# Before running this script setup windows with a dummy user
# then use https://github.com/Sophia-Community/SophiApp
#
# irm app.sophi.app -useb | iex
#
# run the following actions:
# - remove all bloatware except xbox
# - disable cortana
# - unpin tiles
# - enable dark mode
# - disable telemetry
#
# run boxstarter with this script after installing apps and updates create new user.
# switch to new user some settings are not set for the new user so run this script again
# remove dummy user
#
# Inspiration from:
# - https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# - https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9
#---- TEMPORARY ---
Disable-UAC
#--- Fonts ---
cinst inconsolata -y
cinst FiraCode -y
#--- Windows Settings ---
Disable-BingSearch
Disable-GameBarTips
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Set-StartScreenOptions -EnableBootToDesktop
#--- Windows Subsystems/Features ---
cinst install Microsoft-Hyper-V-All -source windowsFeatures
cinst Microsoft-Windows-Subsystem-Linux -source windowsfeatures
# Use sopiaapp to install ubuntu
#Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing
#Add-AppxPackage -Path ~/Ubuntu.appx
#--- Tools ---
cinst sysinternals -y
cinst git
cinst git-credential-manager-for-windows
cinst microsoft-windows-terminal # some this doesn't work because of VCdist try installing with store
cinst cmder
#--- DRIVERS ---
cinst geforce-experience
cinst msiafterburner
#--- DEV APPS ---
cinst microsoft-edge
cinst firefox
cinst googlechrome
cinst vscode
cinst docker-desktop
cinst Temurin17 # java 17 jdk
cinst nvm # install node 16
#--- WIN APPS ---
cinst 1password -f -not-silent
cinst 7zip
cinst dropbox
cinst ccleaner
cinst hwinfo
cinst hwmonitor
## WORK
cinst citrix-workspace
cinst slack
cinst office365proplus
cinst microsoft-teams
#--- MEDIA ---
cinst paint.net
cinst vlc
cinst qbittorrent
cinst whatsapp
cinst tidal
cinst spotify
#--- GAME STUFF ---
cinst steam
cinst goggalaxy
cinst battle.net
cinst discord
cinst uplay
cinst origin
cinst epicgameslauncher
#--- ADJUST WINDOWS Settings ---
### should be tackled by debloater
# Privacy: Let apps use my advertising ID: Disable
#If (-Not (Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo")) {
# New-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo | Out-Null
#}
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 1
# WiFi Sense: HotSpot Sharing: Disable
#Set-ItemProperty -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting -Name value -Type DWord -Value 0
# WiFi Sense: Shared HotSpot Auto-Connect: Disable
#Set-ItemProperty -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots -Name value -Type DWord -Value 0
# Activity Tracking: Disable
# @('EnableActivityFeed','PublishUserActivities','UploadUserActivities') |% { Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\System -Name $_ -Type DWord -Value 0 }
# Disable Telemetry (requires a reboot to take effect)
# Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWord -Value 0
#Get-Service DiagTrack,Dmwappushservice | Stop-Service | Set-Service -StartupType Disabled
# Change Explorer home screen back to "This PC"
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Type DWord -Value 1
# Change it back to "Quick Access" (Windows 10 default)
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Type DWord -Value 2
# These make "Quick Access" behave much closer to the old "Favorites"
# Disable Quick Access: Recent Files
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowRecent -Type DWord -Value 0
# Disable Quick Access: Frequent Folders
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowFrequent -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowRecent -Type DWord -Value 1
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowFrequent -Type DWord -Value 1
# Disable the Lock Screen (the one before password prompt - to prevent dropping the first character)
If (-Not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization)) {
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name Personalization | Out-Null
}
Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -Type DWord -Value 1
# To Restore:
#Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -Type DWord -Value 1
# Better File Explorer
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2
# Turn off People in Taskbar
If (-Not (Test-Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People")) {
New-Item -Path HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People | Out-Null
}
Set-ItemProperty -Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name PeopleBand -Type DWord -Value 0
# Hide useless folders
gi "$Home\3D Objects",$Home\Contacts,$Home\Favorites,$Home\Links,"$Home\Saved Games",$Home\Searches -Force | foreach { $_.Attributes = $_.Attributes -bor "Hidden" }
# To Restore:
# gi "$Home\3D Objects",$Home\Contacts,$Home\Favorites,$Home\Links,"$Home\Saved Games",$Home\Searches -Force | foreach { $_.Attributes = $_.Attributes -xor "Hidden" }
#--- Restore Temporary Settings ---
Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
#--- Rename the Computer ---
# Requires restart, or add the -Restart flag
## i name my devices after suits characters ;)
$computername = "iLouis"
if ($env:computername -ne $computername) {
Rename-Computer -NewName $computername
}
. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/spike1292/c064c43aaf3df656b346680b3915e2c1/raw/38441ba74894b76673fa0e802f6f7145f3f01059/boxstarter-script.ps1 -DisableReboots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment