# Boxstarter script for my portable Windows To Go install # Workaround for https://github.com/chocolatey/boxstarter/issues/241 $cache = "--cacheLocation=`"$env:userprofile\AppData\Local\ChocoCache`"" # 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 $cache chocolatey # Common dependencies choco upgrade -y $cache dotnet3.5 # Drivers choco upgrade -y $cache nvidia-display-driver --version=425.31 --params "'/HDAudio'" # Latest version supporting the 670MX # Utilities choco upgrade -y $cache 7zip.install choco upgrade -y $cache k-litecodecpackbasic choco upgrade -y $cache wiztree choco upgrade -y $cache gpg4win choco upgrade -y $cache git.install --params "/GitOnlyOnPath /NoAutoCrlf /WindowsTerminal /NoShellIntegration /NoCredentialManager" choco upgrade -y $cache qtpass # Refresh the environment to get access to gpg/git commands refreshenv # Import GPG key gpg --keyserver hkp://pool.sks-keyservers.net --recv-key EE27143FD4C1C95A86B4D83D806539FA8D18CA37 # Browser choco upgrade -y $cache firefox --params "/l:en-US /NoTaskbarShortcut /NoDesktopShortcut" choco upgrade -y $cache setdefaultbrowser SetDefaultBrowser HKLM Firefox-308046B0AF4A39CB # Chat choco upgrade -y $cache discord # Games #choco upgrade -y $cache 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"