~/handys11

Windows tips

Utilities and tweaks I reuse.

Setup

Upgrade all apps with winget

Update every installed package in one command, accepting agreements silently.

powershell
Download
winget upgrade --all --silent --accept-package-agreements --accept-source-agreements

Debloat

Windows 11 taskbar & search tweaks

Disable the right-click clock menu, Cortana, and web search in Start, then restart Explorer.

powershell
Download
# Requires: Run as Administrator
# PowerShell script to tweak Windows 11:
# - Disable right-click clock/taskbar menu
# - Disable Cortana and web search
# - Restart Explorer to apply changes

# ---------------------------
# Elevation check
# ---------------------------
if (-not ([bool]([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))) {
    Write-Warning "This script must be run as Administrator. Restarting as Admin..."
    Start-Process powershell.exe "-ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
    exit
}

# ---------------------------
# Disable right-click clock/taskbar menus (Windows 11 modern method)
# ---------------------------
$ClockMenuKey = "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32"
if (!(Test-Path $ClockMenuKey)) { New-Item -Path $ClockMenuKey -Force }
Set-ItemProperty -Path $ClockMenuKey -Name "(Default)" -Value ""

# ---------------------------
# Disable online search in Start Menu & Cortana
# ---------------------------
$ExplorerPolicyKey = "HKCU:\Software\Policies\Microsoft\Windows\Explorer"
if (!(Test-Path $ExplorerPolicyKey)) { New-Item -Path $ExplorerPolicyKey -Force }

# Disable web search and suggestions
Set-ItemProperty -Path $ExplorerPolicyKey -Name "DisableSearchBoxSuggestions" -Value 1 -Type DWord
Set-ItemProperty -Path $ExplorerPolicyKey -Name "DisableWebSearch" -Value 1 -Type DWord
Set-ItemProperty -Path $ExplorerPolicyKey -Name "ConnectedSearchUseWeb" -Value 0 -Type DWord

# Remove Cortana from taskbar/search
$CortanaKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search"
if (!(Test-Path $CortanaKey)) { New-Item -Path $CortanaKey -Force }
Set-ItemProperty -Path $CortanaKey -Name "CortanaEnabled" -Value 0 -Type DWord

# ---------------------------
# Restart Explorer to apply changes
# ---------------------------
Write-Output "Restarting Explorer to apply changes..."
Stop-Process -Name explorer -Force
Start-Process explorer.exe

Write-Output "All tweaks applied successfully!"