Files
wehub-resource-sync 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
chore: import upstream snapshot with attribution
2026-07-13 12:32:37 +08:00

30 lines
1.3 KiB
PowerShell

# SPDX-License-Identifier: MIT
# winpodx debloat: OneDrive uninstall + File Explorer integration removal
Write-Host "[onedrive] Stopping OneDrive..."
Stop-Process -Name "OneDrive" -Force -ErrorAction SilentlyContinue
Write-Host "[onedrive] Running OneDriveSetup uninstall..."
$setup = @(
"$env:SystemRoot\System32\OneDriveSetup.exe",
"$env:SystemRoot\SysWOW64\OneDriveSetup.exe"
) | Where-Object { Test-Path $_ } | Select-Object -First 1
if ($setup) {
Start-Process -FilePath $setup -ArgumentList "/uninstall" -NoNewWindow -Wait -ErrorAction SilentlyContinue
}
Write-Host "[onedrive] Removing File Explorer pane entries..."
$onedriveClsids = @(
"HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}",
"HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
)
foreach ($clsid in $onedriveClsids) {
if (Test-Path $clsid) {
Set-ItemProperty -Path $clsid -Name "System.IsPinnedToNameSpaceTree" -Value 0 -Type DWord -Force -ErrorAction SilentlyContinue
}
}
Write-Host "[onedrive] Removing scheduled autorun..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "OneDrive" -Force -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "OneDriveSetup" -Force -ErrorAction SilentlyContinue