Skip to content

Latest commit

 

History

History
242 lines (198 loc) · 12.1 KB

README.md

File metadata and controls

242 lines (198 loc) · 12.1 KB

Microsoft Windows 11 Setup (for my desktop)

Manual one-time steps

Note: This assumes you're running a fresh Windows 11 installation on a device with an ASUS motherboard and GeForce graphics card. It's also specific to my setup (e.g. I use an Apple keyboard and trackpad as I go between my desktop and MacBook)

Once drive is wiped, Windows 11 Pro is installed from scratch, and the initial setup is complete;

  • Activate Windows, if required (see password manager for Kinguin OEM key in my case); OR
  • Sign in to Microsoft during set-up and Windows will activate automatically
  • Bluetooth connect Magic Keyboard and Magic Trackpad
  • Download and install the “Armoury Crate App” (i.e. the ASUS Motherboard management app)
    • You should be prompted to download and install it automatically
  • Armoury Crate -> Device -> Update Center -> Update All
  • Sign in to Microsoft OneDrive (via the taskbar icon or entering the OneDrive directory)
    • In "Sync & Backup", click "manage backups" and de-select all folders (especially "Documents")
    • In "Account", "Unlink this PC"
  • Navigate to your home directory For Desktop, Documents, Pictures, Music, and Videos;
    • For each directory, right-click -> Properties -> Location -> Restore Default, then Apply -> OK
    • Note: This must be done before the automated setup script uninstall OneDrive. Windows 11 forces you into using OneDrive synchronised home directory sub directories on first install. This ensures that these directories do not break or become unwritable once OneDrive has been removed
  • Install PowerShell 7+
    • Microsoft Store -> search "PowerShell" and install (note: PowerShell on msstore is different to the stock "Windows PowerShell")
  • Install winget (AKA "App Installer") update from here (source)
  • Settings ->
    • Windows Update -> Check for updates
      • “Update all”
      • PLUS optional updates EXCEPT for drivers
      • Note: IIRC the current NVIDIA graphics driver Microsoft offers (which may not be the most recent), and the NVIDIA Settings app are installed during this process
    • System ->
      • Display -> Night light
        • Turn on
        • Strength: 85%
        • Schedule night light: on
          • 22:00 - 6:00
      • For developers -> Terminal -> Select “Windows Terminal”
      • Multi-tasking -> Snap windows
        • When I snap a window, suggest what I can snap next to it - turn off
        • Show my snapped windows when I hover over taskbar apps - turn off (turns off window grouping)
      • Power -> Screen and sleep
        • When plugged in, turn off my screen after -> 15 minutes
        • When plugged in, put my device to sleep after -> Never
    • Apps -> Advanced app settings ->
      • App execution aliases ->
        • App Installer python.exe -> OFF
        • App Installer python3.exe -> OFF
    • Accessibility -> Mouse pointer and touch
      • Change to black mouse cursor
    • Privacy & security -> Activity history
      • Store my activity history on this device -> OFF
      • (Existing history can also be cleared here)
  • Control Panel -> Back up and Restore
    • Ensure automatic backups for Storage (D:) are on
  • Microsoft Store ->
    • Profile -> Settings -> App updates -> Turn on
    • Library -> Get Updates (ensure all apps are up to date)
  • Open a File Explorer -> View -> Show ->
    • File name extensions -> Turn on
    • Hidden items -> Turn on
  • Install the following manually (as they are not packaged managed as of 11/11/23)
  • View advanced system settings -> Start-up and Recovery -> System failure
    • Write an event to the system log -> ON
    • Automatically restart -> OFF
    • Write debugging information -> Complete memory dump
  • Control Panel -> Power Options -> Choose what the power buttons do ->
    • Turn on fast startup -> OFF
  • Edit group policy (run from Start)
    • Computer Configuration -> Administrative Templates -> Windows Components -> Windows PowerShell ->
      • Turn on Script Execution - double-click it
        • Turn on Script Execution: Enabled
        • Execution Policy -> Allow local scripts and remote signed scripts
  • Restart once all complete

Automated setup

Assuming you cloned this repo into a desired location locally already;

  • Open Terminal app (defaults to PowerShell) or PowerShell session as Administator, unless already open

  • cd ~/path/to/dotfiles/windows (i.e. cd ~/workspaces/personal/dotfiles/windows)

  • ./setup.ps1

Note: the first run will take quite some time. Allow for an hour or more, but keep an eye out for any unexpected prompts.

  • Restart (if required)
  • Open a WSL terminal (if first time running, follow the setup prompts)
  • navigate to cd /mnt/c/Users//workspaces/dotfiles/windows
  • ./setup-wsl.sh

Note: this is still a WIP and may require multiple executions (and reboots during first installation) for it to complete.

Install Web Apps (PWAs - via MS Edge)

App Web URL
Gmail Gmail
Google Calendar Google Calendar
Ionos Ionos
Excalidraw Excalidraw
Microsoft Designer Microsoft Designer
Google Contacts Google Contacts
World Salsa Radio World Salsa Radio
Poolsuite Poolsuite
BetterMe BetterMe

Pin Apps to Panel (taskbar)

  • Settings
  • File Explorer
  • Arc
  • Notion
  • Gmail
  • Google Calendar
  • Terminal
  • Warp (Ubuntu)
  • VS Code
  • Sublime
  • Chatbox
  • ClickUp
  • Excalidraw
  • Microsoft Office (Online)
  • Microsoft Designer
  • KeeWeb
  • Google Contacts
  • Spotify
  • YT Music
  • Poolsuite.fm
  • SoundCloud
  • World Salsa Radio
  • WhatsApp
  • FB Messenger
  • Signal
  • Slack
  • BetterMe

Information

  • windows/setup.ps1 is written to be one of the first, and only things to run on my Windows 11 machine in that it installs and configures almost everything I need
    • setup.ps1 can be run anytime. It only updates or makes changes when necessary
  • windows/lib contains shared functions and vars, and helper files that may be copied to local directories where they can be executed
  • windows/powershell contains PowerShell profile, aliases (like my git aliases), etc. $PROFILE sources windows/powershell/config.ps1 and windows/powershell/aliases.ps1
  • windows/setup-wsl.sh is written to setup a WSL environment with my bare minimum for developing in a nix environemnt
  • windows/wsl contains a WSL-specific bash profile, aliases
  • shared/dotfiles contains bash profile (bashrc) and bash aliases (aliases)
  • shared/lib contains shared functions and vars common across all my *nix environments

TODO

  • Keyboard and trackpad configuration
    • Add F3 → Expose / “Mission Control” / Show all windows and workspaces
    • Add F4 → Start menu (i.e. “app launcher”)
    • Cmd+Tilda shortcut to cycle between common app windows
    • Figure out how to map Cmd+Shift+F3 to show or hide desktop (currently have Cmd+F3 working via Kinto default setup)
    • Perhaps remap or assign the above with PowerToys instead of AutoHotKey/Kinto
    • Add 2 finger swipe from right of trackpad shortcut to open notification centre
  • See what else I can automate from the above, i.e.;
    • File Explorer configuration
    • Windows Settings automation
    • Microsoft Store configuration
  • Figure out best way to configure and maintain automatic backups
  • Trigger Windows "clean up, and the new "optimisation" features in Windows 11

Notes

Maintenance

In the event of an issue with machine, in Powershell, run:

dism /online /cleanup-image /restorehealth
sfc /scannow
chkdsk /f

For further ways to diagnose, see the debugging section.

Dynamic Lock

Microsoft OneDrive Complete Uninstallation

Preliminary PowerShell and winget upgrade

Before running the automated setup, some preliminary steps (detailed in Manual one-time steps) must take place first. They are;

  • Install PowerShell 7+ via the Microsoft Store GUI
  • Install the latest winget from here

The stock version of PowerShell that comes with Windows 11 is "Windows PowerShell v5" specifically, is outdated, and unmaintained but still the defacto version of PowerShell supplied with Windows 11 out of the box. The same applies to winget (or "App Installer"). The stock version is outdated and needs to be updated before it can run

Installing the latest NVIDIA RTX Drivers (Studio)

Latest Studio driver as of 30/1/24: https://www.nvidia.co.uk/download/driverResults.aspx/218485/en-uk Or search for correct driver (use the Studio Driver) here: https://www.nvidia.com/download/index.aspx

Once setup above is all complete, it is wise to update the NVIDIA Graphics driver. I'd done this previously by installing the GeForce Experience app (for remote play, etc), however I started seeing BSODs regularly after installing this software and using it to update drivers.

Note: Opt for the "Studio" version of the driver, vs the "Game Ready" driver. Game Ready = Node.js edge/latest Studio = Nodes.js stable/LTS

Debugging

Note: run the tasks described in this section. If they don't solve your issue, read on

Disable automatic restart (i.e. enable Blue Screen)

View shutdown logs

View system crash details (i.e. when blue screens occur)

  • Install "BlueScreenView" unless already installed
  • Run "BlueScreenView" and observe the top-most (latest) crash record