docs: explain pre-2026 legacy cleanup scope and safety

This commit is contained in:
Diwie committed 2026-10-18 12:19:33 +02:00
1 parent ca84035d35
commit a652d94fb3
1 file changed
+20
+20
View File
@@ -37,6 +37,26 @@ Uninstall the broader set without per-product confirmation (destructive; preview
MSI verbose logs and `results.csv` are stored in `%TEMP%\VisualStudioUninstallAll`. Exit code 0 generally means success; 3010 means success with restart required.
## Legacy cleanup (pre-2026)
Run \`.\VisualStudioUninstallAll.ps1 -CleanupLegacy -WhatIf\` to preview
legacy entries. \`-CleanupLegacy\` considers only machine-wide Uninstall keys
with a GUID-formatted key name and an **explicit Visual Studio year 2000–2025**
in their display name. It excludes Visual Studio Code, Installer and IDE editions.
For each candidate, Windows Installer ProductState is checked: state -1 means
a backup of the uninstall key is exported before removing that key; state 5
triggers a normal MSI uninstall (with confirmation); any other state is skipped.
No Installer\UserData or Classes\Installer keys are deleted.
Products with no explicit year in the name are intentionally excluded.
Run elevated and inspect the preview first:
\`\`\`powershell
.\VisualStudioUninstallAll.ps1 -CleanupLegacy -WhatIf
.\VisualStudioUninstallAll.ps1 -CleanupLegacy
\`\`\`
## Registry cleanup (advanced)
The optional \`-RemoveOrphanedRegistryEntries\` switch removes **only** machine-wide