3e779be6f3
CI / lint (push) Failing after 13m4s
CI / test (3.11, ubuntu-latest) (push) Failing after 2m4s
CI / test (3.13, ubuntu-latest) (push) Successful in 13m30s
CI / test (3.14, ubuntu-latest) (push) Successful in 17m21s
CI / test (3.12, ubuntu-latest) (push) Successful in 17m55s
CI / discover-apps-ps (push) Successful in 1m56s
CI / test (3.9, ubuntu-latest) (push) Successful in 13m17s
CI / test (3.10, ubuntu-latest) (push) Successful in 26m21s
CI / audit (push) Successful in 13m38s
Deploy site / deploy (push) Has been cancelled
CI / test (3.14, ubuntu-24.04-arm) (push) Has been cancelled
36 lines
1.4 KiB
PowerShell
36 lines
1.4 KiB
PowerShell
# SPDX-License-Identifier: MIT
|
|
# winpodx debloat: common startup autorun entries.
|
|
#
|
|
# We only target the HKCU\...\Run + HKCU\...\StartupApproved keys,
|
|
# not HKLM, so this is reversible per-user (HKLM autostarts are usually
|
|
# OEM machine-level and shouldn't be touched without consent).
|
|
|
|
$names = @(
|
|
"OneDrive",
|
|
"OneDriveSetup",
|
|
"Teams",
|
|
"MicrosoftTeams",
|
|
"Skype",
|
|
"Spotify",
|
|
"Discord",
|
|
"Adobe Updater",
|
|
"Adobe ARM",
|
|
"iTunesHelper",
|
|
"RealPlayerSetup",
|
|
"GoogleUpdate"
|
|
)
|
|
|
|
foreach ($name in $names) {
|
|
Write-Host "[startup_programs] Removing autostart entry: $name"
|
|
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name $name -Force -ErrorAction SilentlyContinue
|
|
# Toggle the "approved" bitfield so even if the Run key resurfaces
|
|
# via an installer, Windows shows it as disabled in the Startup
|
|
# Apps UI rather than silently re-enabling it.
|
|
$approvedKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run"
|
|
if (Test-Path $approvedKey) {
|
|
# 0x03000000 0x00000000 ... is the "disabled" sentinel Windows
|
|
# writes when the user toggles a Startup App off via Settings.
|
|
Set-ItemProperty -Path $approvedKey -Name $name -Value ([byte[]](0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00)) -Type Binary -Force -ErrorAction SilentlyContinue
|
|
}
|
|
}
|