diff --git a/README.md b/README.md index 0a799e0..7743d51 100644 --- a/README.md +++ b/README.md @@ -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