Skip to content

Instantly share code, notes, and snippets.

@lengers
Last active October 20, 2020 18:16
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 lengers/ca152cc252c25536222b05d95b0412b2 to your computer and use it in GitHub Desktop.
Save lengers/ca152cc252c25536222b05d95b0412b2 to your computer and use it in GitHub Desktop.
Dirty script to setup a freshly installed Windows OS how I like it for gaming purposes
## Installs:
# - Google Chrome
# - Visual Studio Code
# - Steam
# - GOG Galaxy
# - Epic Games Launcher
# - NVIDIA GeForce Experience
# - OBS Studio
# - OBS NDI support
# - Discord
# - TeamSpeak
# - PuTTY
# - WinSCP
# - Spotify
# - 7zip
# - JRE 8
# - VLC
# - WinDirStat
# - Greenshot
#
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing additional Choco packages..."
If (-not (Test-Path "C:\ProgramData\chocolatey")) {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Chocolatey..."
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
} else {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Chocolatey is already installed."
}
# Browser
# replace "GoogleChrome" with "firefox", "opera" or "brave" according to taste
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Google Chrome..."
choco install -y --limit-output --no-progress GoogleChrome
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of Google Chrome complete!"
# Fully functional editor
# replace "vscode" with "NotepadPlusPlus" or "atom" according to taste
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing VS Code..."
choco install -y --limit-output --no-progress vscode
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of VS Code complete!"
# Gaming tools
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Steam..."
choco install -y --limit-output --no-progress steam
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of Steam complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing GOG Galaxy..."
choco install -y --limit-output --no-progress goggalaxy
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of GOG Galaxy complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Epic Games Launcher..."
choco install -y --limit-output --no-progress epicgameslauncher
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of Epic Games Launcher complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing NVIDIA GeForce Experience..."
choco install -y --limit-output --no-progress geforce-experience
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of NVIDIA GeForce Experience complete!"
# Streaming
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing OBS..."
choco install -y --limit-output --no-progress obs-studio
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of OBS complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing OBS NDI support..."
choco install -y --limit-output --no-progress obs-ndi
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of OBS NDI support complete!"
# Communications
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Discord..."
choco install -y --limit-output --no-progress discord
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of Discord complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing TeamSpeak..."
choco install -y --limit-output --no-progress teamspeak
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of TeamSpeak complete!"
# Remote administration
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing PuTTY..."
choco install -y --limit-output --no-progress putty
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of PuTTY complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing WinSCP..."
choco install -y --limit-output --no-progress winscp
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of WinSCP complete!"
# Entertainment
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Spotify..."
choco install -y --limit-output --no-progress spotify
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of Spotify complete!"
# Utilities
# replace "7zip" with "WinRar" according to taste
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing 7zip..."
choco install -y --limit-output --no-progress 7zip
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of 7zip complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing VLC Media Player..."
choco install -y --limit-output --no-progress vlc
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of VLC Media Player complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Java 8 Runtime Environment..."
choco install -y --limit-output --no-progress jre8
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of Java 8 Runtime Environment complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing WinDirStat..."
choco install -y --limit-output --no-progress windirstat
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of WinDirStat complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Greenshot..."
choco install -y --limit-output --no-progress greenshot
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of Greenshot complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installation of software using choco complete!"
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Making Windows 10 Great again"
# Remove OneDrive from the System
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Removing OneDrive..."
$onedrive = Get-Process onedrive -ErrorAction SilentlyContinue
if ($onedrive) {
taskkill /f /im OneDrive.exe
}
c:\Windows\SysWOW64\OneDriveSetup.exe /uninstall
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) OneDrive removed!"
$shutUp10Config = @"
P001 +
P002 +
P003 +
P004 +
P005 +
P006 +
P008 +
P017 +
P026 +
P027 +
P028 +
P064 +
P065 +
P066 +
P067 +
P069 -
P009 -
P010 -
P015 -
P068 +
P016 -
A001 +
A002 +
A003 +
A004 +
A006 +
A005 +
P007 +
P036 +
P025 +
P033 +
P023 +
P056 +
P057 -
P012 -
P034 -
P013 -
P035 -
P062 -
P063 -
P047 -
P019 -
P048 -
P049 -
P020 -
P037 -
P011 -
P038 -
P050 -
P051 -
P018 -
P039 -
P021 -
P040 -
P022 -
P041 -
P014 -
P042 -
P052 -
P053 -
P054 -
P055 -
P029 -
P043 -
P030 -
P044 -
P031 -
P045 -
P032 -
P046 -
P058 -
P059 -
P060 -
P061 -
P024 -
S001 -
S002 -
S003 +
S008 -
E101 +
E115 +
E116 +
E117 +
E118 +
E107 +
E111 +
E112 +
E109 +
E121 +
E103 +
E119 -
E120 -
E122 -
E106 -
E001 +
E002 +
E003 +
E008 +
E007 +
E010 +
E011 +
E012 +
E009 -
E004 -
E005 -
E013 -
E014 -
E006 -
Y001 +
Y002 +
Y003 +
Y004 +
Y005 +
Y006 +
Y007 +
C012 +
C002 +
C013 +
C007 +
C008 +
C009 +
C010 +
C011 +
L001 +
L003 +
L004 +
L005 +
U001 +
U004 +
U005 +
W001 +
W011 +
W004 -
W005 -
W010 -
W009 -
W006 -
W008 -
M006 +
M011 -
M010 -
O003 -
O001 -
S012 -
S013 -
S014 -
S011 -
K001 -
K002 -
K005 -
M001 +
M004 +
M005 +
M003 -
M012 +
M013 -
M014 -
M015 +
M016 +
N001 -
"@
$shutUp10ConfigPath = "$env:USERPROFILE\AppData\Local\Temp\OOSU10.exe"
Out-File -FilePath $shutUp10ConfigPath -InputObject $shutUp10Config.Replace("`n", "`r`n") -Encoding unicode -Append -Force
# Download and install ShutUp10
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading ShutUp10..."
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
# Disabling the progress bar speeds up IWR https://github.com/PowerShell/PowerShell/issues/2138
$ProgressPreference = 'SilentlyContinue'
$shutUp10DownloadUrl = "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe"
$shutUp10RepoPath = "$env:USERPROFILE\AppData\Local\Temp\OOSU10.exe"
if (-not (Test-Path $shutUp10RepoPath)) {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing ShutUp10 and disabling Windows Defender"
Invoke-WebRequest -Uri "$shutUp10DownloadUrl" -OutFile $shutUp10RepoPath
. $shutUp10RepoPath $shutUp10ConfigPath /quiet /force
} else {
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) ShutUp10 was already installed. Moving On."
}
# Remove the Edge shortcut from the Desktop
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Removing Edge Browser Link on Desktop..."
$lnkPath = "$env:USERPROFILE\Desktop\Microsoft Edge.lnk"
if (Test-Path $lnkPath) { Remove-Item $lnkPath }
$makeWindowsGreatAgainRegs = @"
Windows Registry Editor Version 5.00
# Disable Cortana (Windows search still remains)
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search]
"AllowCortana"=dword:00000000
# Disable Notification Center
[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer]
"DisableNotificationCenter"=dword:00000001
# Disable Microsoft.com accounts
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"NoConnectedUser"=dword:00000003
# Show all file extensions
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"HideFileExt"=dword:00000000
# Set explorer to open to "This PC" for new windows
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"LaunchTo"=dword:00000001
# Show hidden files (not including OS files)
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Hidden"=dword:00000001
# Show "This PC" on Desktop
# Created by: Shawn Brink
# http://www.tenforums.com
[HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
"{20D04FE0-3AEA-1069-A2D8-08002B30309D}"=dword:00000000
# Enable Developer Mode (prerequisite for Linux subsystem)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock]
"AllowDevelopmentWithoutDevLicense"=dword:00000001
# Disable Microsoft People icon from taskbar
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People]
"PeopleBand"=dword:00000000
"@
$makeWindowsGreatAgainRegsPath = "$env:USERPROFILE\AppData\Local\Temp\MakeWindows10GreatAgain.reg"
Out-File -FilePath $makeWindowsGreatAgainRegsPath -InputObject $makeWindowsGreatAgainRegs.Replace("`n", "`r`n") -Encoding unicode -Append -Force
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Importing registry keys..."
regedit /s $makeWindowsGreatAgainRegsPath
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) All done! Update your drivers, and reboot the system to ensure all changes take effect."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment