Automated setup of Windows 10 through Boxstarter/Chocolatey/etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

75 lines
2.7 KiB

# Boxstarter script for my portable Windows To Go install
# We don't have to always validate UAC during this script run
Disable-UAC
# Ensure installing powershell modules don't prompt on needed dependencies
$ConfirmPreference = "None"
# Upgrade chocolatey itself
choco upgrade -y chocolatey
# Common dependencies
choco upgrade -y dotnet3.5
# Drivers
choco upgrade -y nvidia-display-driver --version=425.31 --params "'/HDAudio'" # Latest version supporting the 670MX
# Utilities
choco upgrade -y 7zip.install
choco upgrade -y k-litecodecpackbasic
choco upgrade -y wiztree
choco upgrade -y gnupg
choco upgrade -y qtpass
# Browser
choco upgrade -y firefox --params "/l:en-US /NoTaskbarShortcut /NoDesktopShortcut"
choco upgrade -y setdefaultbrowser
SetDefaultBrowser HKLM Firefox-308046B0AF4A39CB
# Chat
choco upgrade -y discord
# Games
#choco upgrade -y leagueoflegendseuw --ignore-checksum
#Note: Battle.net needs to be manually installed!
# Install Microsoft updates
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula -criteria "IsHidden=0 and IsInstalled=0" # Also install non-critical and non-Software updates
# Rename the computer
$computername = "GoFish-WinToGo"
if ($env:computername -ne $computername) {
Rename-Computer -NewName $computername -Restart
}
# Re-enable UAC
Enable-UAC
# Power profile
## Set power plan to high performances
powercfg /setactive scheme_min
## Unhide "Lid close action" in plan advanced power settings
powercfg -attributes sub_buttons lidaction -attrib_hide
## Unhide "Power button action" in plan advanced power settings
powercfg -attributes sub_buttons pbuttonaction -attrib_hide
## Do not sleep when lid is closed. This will not change the value in "Control Panel\Hardware and Sound\Power Options\System Settings", but it will still work.
powercfg /setacvalueindex scheme_current sub_buttons lidaction 0
powercfg /setdcvalueindex scheme_current sub_buttons lidaction 0
## Do not sleep when power button is pressed. This will not change the value in "Control Panel\Hardware and Sound\Power Options\System Settings", but it will still work.
powercfg /setacvalueindex scheme_current sub_buttons pbuttonaction 0
powercfg /setdcvalueindex scheme_current sub_buttons pbuttonaction 0
## Turn off display after 30 minutes of inactivity on AC
powercfg /setacvalueindex scheme_current sub_video videoidle 1800
## Re-activate current scheme to make settings take effect immediately
powercfg /setactive scheme_current
# Force remove of the hiberfil.sys file even if hibernation is already disabled in Win2Go
powercfg /hibernate off
# Set available keyboard inputs
Set-WinUserLanguageList -LanguageList en-US, fr-FR -Force
# Set how dates/times/etc. are displayed
Set-Culture -CultureInfo fr-FR
# Set the timezone to Paris
Set-TimeZone -Id "Romance Standard Time"